Fix TileMap NavigationServer 'Invalid ID' error

Fixes NavigationServer 'Invalid ID' error of the TileMap.
The issue was not caused directly by the TileMap but with the late call to get_world_2d()->get_navigation_map() while everything is shut down abruptly e.g. game window closed or Editor "Reload Saved Scene" function.
This commit is contained in:
smix8
2023-02-14 01:28:14 +01:00
parent 853c36ca0b
commit fef6ffabe5
2 changed files with 6 additions and 2 deletions

View File

@@ -212,6 +212,7 @@ private:
HashMap<Vector2i, TileMapQuadrant> quadrant_map;
SelfList<TileMapQuadrant>::List dirty_quadrant_list;
RID navigation_map;
bool uses_world_navigation_map = false;
};
LocalVector<TileMapLayer> layers;
int selected_layer = -1;