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

Function GetCollectionByHash

engine/gameobject/src/gameobject/gameobject.cpp:362–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360 }
361
362 HCollection GetCollectionByHash(HRegister regist, dmhash_t socket_name)
363 {
364 DM_MUTEX_SCOPED_LOCK(regist->m_Mutex);
365 uint32_t collection_count = regist->m_Collections.Size();
366 for (uint32_t i = 0; i < collection_count; ++i)
367 {
368 Collection* collection = regist->m_Collections[i];
369 if (collection->m_NameHash == socket_name)
370 return collection->m_HCollection;
371 }
372 return 0;
373 }
374
375 void DeleteRegister(HRegister regist)
376 {

Callers 5

Script_ExistsFunction · 0.85
AttachCollectionFunction · 0.85
DispatchCallbackFunction · 0.85
DispatchCallbackFunction · 0.85
GetCollectionByNameFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by 1

GetCollectionByNameFunction · 0.68