mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
reload chain execution
for imageassets and materialassets, check any other assets using them, and uppon completion of reloading, kick off the using assets reload as well in serial
This commit is contained in:
parent
9f5c74c79a
commit
bfc921da22
2 changed files with 17 additions and 0 deletions
|
|
@ -301,6 +301,15 @@ void ImageAsset::initializeAsset()
|
|||
void ImageAsset::onAssetRefresh()
|
||||
{
|
||||
mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath;
|
||||
|
||||
AssetManager::typeAssetDependsOnHash::Iterator assetDependenciesItr = mpOwningAssetManager->getDependedOnAssets()->find(mpAssetDefinition->mAssetId);
|
||||
// Iterate all dependencies.
|
||||
while (assetDependenciesItr != mpOwningAssetManager->getDependedOnAssets()->end() && assetDependenciesItr->key == mpAssetDefinition->mAssetId)
|
||||
{
|
||||
StringTableEntry assetId = assetDependenciesItr->value;
|
||||
AssetBase* dependent = AssetDatabase.acquireAsset<AssetBase>(assetId);
|
||||
dependent->refreshAsset();
|
||||
}
|
||||
}
|
||||
|
||||
void ImageAsset::_onResourceChanged(const Torque::Path& path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue