Fix VisibleOnScreenEnabler disabling in editor
This commit is contained in:
parent
c7c561ffd5
commit
256e250c87
2 changed files with 2 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ void VisibleOnScreenEnabler2D::set_enable_node_path(NodePath p_path) {
|
|||
return;
|
||||
}
|
||||
enable_node_path = p_path;
|
||||
if (is_inside_tree()) {
|
||||
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) {
|
||||
node_id = ObjectID();
|
||||
Node *node = get_node(enable_node_path);
|
||||
if (node) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ void VisibleOnScreenEnabler3D::set_enable_node_path(NodePath p_path) {
|
|||
return;
|
||||
}
|
||||
enable_node_path = p_path;
|
||||
if (is_inside_tree()) {
|
||||
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) {
|
||||
node_id = ObjectID();
|
||||
Node *node = get_node(enable_node_path);
|
||||
if (node) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue