mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 20:40:35 +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
|
|
@ -157,7 +157,8 @@ bool GroundPlane::onAdd()
|
|||
|
||||
void GroundPlane::onRemove()
|
||||
{
|
||||
if (!mMaterialAsset.isNull())
|
||||
U32 assetStatus = MaterialAsset::getAssetErrCode(mMaterialAsset);
|
||||
if (assetStatus == AssetBase::Ok)
|
||||
AssetDatabase.releaseAsset(mMaterialAsset.getAssetId());
|
||||
|
||||
//SAFE_DELETE(mMaterialInst);
|
||||
|
|
@ -593,8 +594,11 @@ void GroundPlane::generateGrid( U32 width, U32 height, F32 squareSize,
|
|||
|
||||
void GroundPlane::getUtilizedAssets(Vector<StringTableEntry>* usedAssetsList)
|
||||
{
|
||||
if (!mMaterialAsset.isNull() && mMaterialAsset->getAssetId() != MaterialAsset::smNoMaterialAssetFallback)
|
||||
U32 assetStatus = MaterialAsset::getAssetErrCode(mMaterialAsset);
|
||||
if (assetStatus == AssetBase::Ok)
|
||||
{
|
||||
usedAssetsList->push_back_unique(mMaterialAsset->getAssetId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue