Merge pull request #67141 from smix8/gridmap_fix_meshlib_replace_3.x
Fix Editor crash when MeshLibrary gets replaced while used in an open Scene
This commit is contained in:
commit
567d5e2f78
1 changed files with 6 additions and 4 deletions
|
@ -561,10 +561,12 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
|
|||
NavigationServer::get_singleton()->region_set_navigation_layers(region, navigation_layers);
|
||||
NavigationServer::get_singleton()->region_set_navmesh(region, navmesh);
|
||||
NavigationServer::get_singleton()->region_set_transform(region, get_global_transform() * nm.xform);
|
||||
if (navigation) {
|
||||
NavigationServer::get_singleton()->region_set_map(region, navigation->get_rid());
|
||||
} else {
|
||||
NavigationServer::get_singleton()->region_set_map(region, get_world()->get_navigation_map());
|
||||
if (is_inside_tree()) {
|
||||
if (navigation) {
|
||||
NavigationServer::get_singleton()->region_set_map(region, navigation->get_rid());
|
||||
} else {
|
||||
NavigationServer::get_singleton()->region_set_map(region, get_world()->get_navigation_map());
|
||||
}
|
||||
}
|
||||
nm.region = region;
|
||||
|
||||
|
|
Loading…
Reference in a new issue