diff options
Diffstat (limited to 'scene/3d/node_3d.cpp')
-rw-r--r-- | scene/3d/node_3d.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index cad1201d63..62cc7c143b 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -147,8 +147,8 @@ void Node3D::_notification(int p_what) { notification(NOTIFICATION_ENTER_WORLD); _update_visibility_parent(true); - } break; + case NOTIFICATION_EXIT_TREE: { notification(NOTIFICATION_EXIT_WORLD, true); if (xform_change.in_list()) { @@ -162,6 +162,7 @@ void Node3D::_notification(int p_what) { data.top_level_active = false; _update_visibility_parent(true); } break; + case NOTIFICATION_ENTER_WORLD: { data.inside_world = true; data.viewport = nullptr; @@ -192,6 +193,7 @@ void Node3D::_notification(int p_what) { } #endif } break; + case NOTIFICATION_EXIT_WORLD: { #ifdef TOOLS_ENABLED clear_gizmos(); @@ -203,7 +205,6 @@ void Node3D::_notification(int p_what) { data.viewport = nullptr; data.inside_world = false; - } break; case NOTIFICATION_TRANSFORM_CHANGED: { @@ -213,9 +214,6 @@ void Node3D::_notification(int p_what) { } #endif } break; - - default: { - } } } |