Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1922,13 +1922,12 @@ void Node::_update_children_cache_impl() const {

int Node::get_child_count(bool p_include_internal) const {
ERR_THREAD_GUARD_V(0);
_update_children_cache();

if (p_include_internal) {
return data.children_cache.size();
} else {
return data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache;
return data.children.size();
}

_update_children_cache();
return data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache;
}

Node *Node::get_child(int p_index, bool p_include_internal) const {
Expand Down