mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #60527 from KoBeWi/unique_names_demastered
This commit is contained in:
@@ -97,6 +97,9 @@ private:
|
||||
Node *parent;
|
||||
Node *owner;
|
||||
Vector<Node *> children; // list of children
|
||||
HashMap<StringName, Node *> owned_unique_nodes;
|
||||
bool unique_name_in_owner = false;
|
||||
|
||||
int pos;
|
||||
int depth;
|
||||
int blocked; // safeguard that throws an error when attempting to modify the tree in a harmful way while being traversed.
|
||||
@@ -203,6 +206,8 @@ private:
|
||||
friend class SceneTree;
|
||||
|
||||
void _set_tree(SceneTree *p_tree);
|
||||
void _release_unique_name_in_owner();
|
||||
void _acquire_unique_name_in_owner();
|
||||
|
||||
protected:
|
||||
void _block() { data.blocked++; }
|
||||
@@ -326,6 +331,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() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user