Merge pull request #69809 from KoBeWi/runtime_enabler_2d
Fix VisibleOnScreenEnabler disabling in editor
This commit is contained in:
commit
0d6fede757
@ -137,7 +137,7 @@ void VisibleOnScreenEnabler2D::set_enable_node_path(NodePath p_path) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
enable_node_path = p_path;
|
enable_node_path = p_path;
|
||||||
if (is_inside_tree()) {
|
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) {
|
||||||
node_id = ObjectID();
|
node_id = ObjectID();
|
||||||
Node *node = get_node(enable_node_path);
|
Node *node = get_node(enable_node_path);
|
||||||
if (node) {
|
if (node) {
|
||||||
|
@ -128,7 +128,7 @@ void VisibleOnScreenEnabler3D::set_enable_node_path(NodePath p_path) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
enable_node_path = p_path;
|
enable_node_path = p_path;
|
||||||
if (is_inside_tree()) {
|
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) {
|
||||||
node_id = ObjectID();
|
node_id = ObjectID();
|
||||||
Node *node = get_node(enable_node_path);
|
Node *node = get_node(enable_node_path);
|
||||||
if (node) {
|
if (node) {
|
||||||
|
Loading…
Reference in New Issue
Block a user