You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Core: Integrate Ref::instantiate where possible
This commit is contained in:
@@ -801,8 +801,8 @@ void GridMap::_octant_enter_world(const OctantKey &p_key) {
|
||||
if (!g.navigation_debug_edge_connections_instance.is_valid()) {
|
||||
g.navigation_debug_edge_connections_instance = RenderingServer::get_singleton()->instance_create();
|
||||
}
|
||||
if (!g.navigation_debug_edge_connections_mesh.is_valid()) {
|
||||
g.navigation_debug_edge_connections_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
|
||||
if (g.navigation_debug_edge_connections_mesh.is_null()) {
|
||||
g.navigation_debug_edge_connections_mesh.instantiate();
|
||||
}
|
||||
|
||||
_update_octant_navigation_debug_edge_connections_mesh(p_key);
|
||||
@@ -1386,8 +1386,8 @@ void GridMap::_update_octant_navigation_debug_edge_connections_mesh(const Octant
|
||||
g.navigation_debug_edge_connections_instance = RenderingServer::get_singleton()->instance_create();
|
||||
}
|
||||
|
||||
if (!g.navigation_debug_edge_connections_mesh.is_valid()) {
|
||||
g.navigation_debug_edge_connections_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
|
||||
if (g.navigation_debug_edge_connections_mesh.is_null()) {
|
||||
g.navigation_debug_edge_connections_mesh.instantiate();
|
||||
}
|
||||
|
||||
g.navigation_debug_edge_connections_mesh->clear_surfaces();
|
||||
|
||||
Reference in New Issue
Block a user