summaryrefslogtreecommitdiff
path: root/scene/main/node.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-04-25 13:38:08 +0200
committerGitHub <noreply@github.com>2022-04-25 13:38:08 +0200
commit7c7ce7dcd7430d8503d6f74bb49c68892bc31dca (patch)
tree172e5211446f4206d928a76e7eee6e8c706be819 /scene/main/node.h
parent6a9115b983384f5dce341b22268dbc7f4a12f64e (diff)
parent8580f377a3d7d72c319e9e5489bcbe1678ad704b (diff)
Merge pull request #60298 from reduz/scene-unique-paths
Diffstat (limited to 'scene/main/node.h')
-rw-r--r--scene/main/node.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/main/node.h b/scene/main/node.h
index 57b150e29a..0973baf793 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -99,6 +99,9 @@ private:
Node *parent = nullptr;
Node *owner = nullptr;
Vector<Node *> children;
+ HashMap<StringName, Node *> owned_unique_nodes;
+ bool unique_name_in_owner = false;
+
int internal_children_front = 0;
int internal_children_back = 0;
int pos = -1;
@@ -193,6 +196,9 @@ private:
_FORCE_INLINE_ bool _can_process(bool p_paused) const;
_FORCE_INLINE_ bool _is_enabled() const;
+ void _release_unique_name_in_owner();
+ void _acquire_unique_name_in_owner();
+
protected:
void _block() { data.blocked++; }
void _unblock() { data.blocked--; }
@@ -345,6 +351,9 @@ public:
Node *get_owner() const;
void get_owned_by(Node *p_by, List<Node *> *p_owned);
+ void set_unique_name_in_owner(bool p_enabled);
+ bool is_unique_name_in_owner() const;
+
void remove_and_skip();
int get_index(bool p_include_internal = true) const;