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

Function FindComponentType

engine/gameobject/src/gameobject/gameobject.cpp:653–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651 }
652
653 ComponentType* FindComponentType(Register* regist, HResourceType resource_type, uint32_t* index)
654 {
655 for (uint32_t i = 0; i < regist->m_ComponentTypeCount; ++i)
656 {
657 ComponentType* ct = &regist->m_ComponentTypes[i];
658 if (ct->m_ResourceType == resource_type)
659 {
660 if (index != 0x0)
661 *index = i;
662 return ct;
663 }
664 }
665 return 0;
666 }
667
668 uint32_t GetNumComponentTypes(HRegister regist)
669 {

Callers 5

RegisterComponentTypeFunction · 0.85
AcquireResourcesFunction · 0.85
GetWorldFunction · 0.85
ScriptPhysicsRegisterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected