mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
asset load flow work
add reloading state to asset tracking, convert most asset.isnull() checks on over to skipping out unless the errcode is ::Ok, or ::UsingFallback add more errstriongcodes to hook up skip load<type> execution if the asset loaded state is ::Ok
This commit is contained in:
parent
753cbe32d9
commit
b710a309bd
23 changed files with 177 additions and 35 deletions
|
|
@ -58,6 +58,7 @@ const String AssetBase::mErrCodeStrings[] =
|
|||
"Failed",
|
||||
"Ok",
|
||||
"NotLoaded",
|
||||
"Reloading",
|
||||
"BadFileReference",
|
||||
"InvalidFormat",
|
||||
"DependencyNotFound",
|
||||
|
|
@ -293,6 +294,8 @@ void AssetBase::refreshAsset(void)
|
|||
if (mpOwningAssetManager == NULL || !mAssetInitialized)
|
||||
return;
|
||||
|
||||
mLoadedState = Reloading;
|
||||
|
||||
// Yes, so refresh the asset via the asset manager.
|
||||
mpOwningAssetManager->refreshAsset(getAssetId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ public:
|
|||
Failed,
|
||||
Ok,
|
||||
NotLoaded,
|
||||
Reloading,
|
||||
BadFileReference,
|
||||
InvalidFormat,
|
||||
DependencyNotFound,
|
||||
|
|
@ -90,6 +91,7 @@ public:
|
|||
return mErrCodeStrings[errCode];
|
||||
};
|
||||
U32 getStatus() { return mLoadedState; };
|
||||
|
||||
AssetBase();
|
||||
virtual ~AssetBase();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue