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

Function GetAbsoluteIdentifier

engine/gameobject/src/gameobject/gameobject.cpp:2156–2171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2154 }
2155
2156 dmhash_t GetAbsoluteIdentifier(HInstance instance, const char* identifier)
2157 {
2158 // check for global id (/foo/bar)
2159 if (*identifier == *ID_SEPARATOR)
2160 {
2161 return dmHashBuffer64(identifier, strlen(identifier));
2162 }
2163 else
2164 {
2165 // Make a copy of the state.
2166 HashState64 tmp_state;
2167 dmHashClone64(&tmp_state, &instance->m_CollectionPathHashState, false);
2168 dmHashUpdateBuffer64(&tmp_state, identifier, strlen(identifier));
2169 return dmHashFinal64(&tmp_state);
2170 }
2171 }
2172
2173 HInstance GetInstanceFromIdentifier(Collection* collection, dmhash_t identifier)
2174 {

Callers 8

Script_GetIdFunction · 0.85
AcquireResourcesFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
GuiResolvePathCallbackFunction · 0.85

Calls 4

dmHashClone64Function · 0.85
dmHashUpdateBuffer64Function · 0.85
dmHashFinal64Function · 0.85
dmHashBuffer64Function · 0.50

Tested by 2

TEST_FFunction · 0.68
TEST_FFunction · 0.68