MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getAssetDependencyField

Method getAssetDependencyField

Engine/source/assets/assetBase.cpp:320–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318//-----------------------------------------------------------------------------
319
320StringTableEntry AssetBase::getAssetDependencyField(const char* pFieldName, S32 index)
321{
322 SimFieldDictionary* fieldDictionary = getFieldDictionary();
323 for (SimFieldDictionaryIterator itr(fieldDictionary); *itr; ++itr)
324 {
325 SimFieldDictionary::Entry* entry = *itr;
326
327 String slotName = String(entry->slotName);
328
329 if (slotName.startsWith(pFieldName))
330 {
331 S32 trailingNum;
332 String::GetTrailingNumber(slotName.c_str(), trailingNum);
333
334 if (trailingNum == index)
335 {
336 return StringTable->insert(String(entry->value).replace(ASSET_ID_FIELD_PREFIX, "").c_str());
337 }
338 }
339 }
340
341 return StringTable->EmptyString();
342}
343
344//-----------------------------------------------------------------------------
345

Callers 1

Calls 6

startsWithMethod · 0.80
replaceMethod · 0.80
EmptyStringMethod · 0.80
StringClass · 0.50
c_strMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected