How do I remove a NavigationPolygon from a tile on a TileSet?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JestersGhost

Tileset has a method for setting the navigation polygon on a tile:

https://godot.readthedocs.io/en/3.1/classes/class_tileset.html#class-tileset-method-tile-set-navigation-polygon

but seems to have no way to remove it afterwards. I’ve tried setting the instance to an empty NavigationPolygon, but that just crashes the the editor when you try and view it.

Short of removing the tile and re-creating it again without the NavigationPolygon, I can’t see anyway of doing this, yet the godot editor lets you delete navigation data off a tile, so presumably there is a way of doing it?

:bust_in_silhouette: Reply From: JestersGhost

As invariably happens, I found the answer just after asking the question :stuck_out_tongue:

For reference for anyone else, you can pass null as the second parameter to tile_set_navigation_polygon and this will clear the navigation data without causing any errors.