Remove multilevel calls
In general they are more confusing to users because they expect inheritance to fully override parent methods. This behavior can be enabled by script writers using a simple super() call.
This commit is contained in:
@@ -174,7 +174,7 @@ void Node3D::_notification(int p_what) {
|
||||
ERR_FAIL_COND(!data.viewport);
|
||||
|
||||
if (get_script_instance()) {
|
||||
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, nullptr, 0);
|
||||
get_script_instance()->call(SceneStringNames::get_singleton()->_enter_world);
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) {
|
||||
@@ -202,7 +202,7 @@ void Node3D::_notification(int p_what) {
|
||||
#endif
|
||||
|
||||
if (get_script_instance()) {
|
||||
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_world, nullptr, 0);
|
||||
get_script_instance()->call(SceneStringNames::get_singleton()->_exit_world);
|
||||
}
|
||||
|
||||
data.viewport = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user