MCPcopy Create free account
hub / github.com/defold/defold / GetChildCount

Function GetChildCount

engine/gameobject/src/gameobject/gameobject.cpp:3382–3394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3380 }
3381
3382 uint32_t GetChildCount(HInstance instance)
3383 {
3384 Collection* collection = instance->m_Collection;
3385 uint32_t count = 0;
3386 uint32_t index = instance->m_FirstChildIndex;
3387 while (index != INVALID_INSTANCE_INDEX)
3388 {
3389 ++count;
3390 index = collection->m_Instances[index]->m_SiblingIndex;
3391 }
3392
3393 return count;
3394 }
3395
3396 bool IsChildOf(HInstance child, HInstance parent)
3397 {

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68