Various fixes

This commit is contained in:
Areloch 2019-05-11 21:42:27 -05:00
parent 60a29777fa
commit 3fa7a0d4fa
27 changed files with 171 additions and 177 deletions

View file

@ -70,6 +70,9 @@
#ifndef MATERIALASSET_H
#include "T3D/assets/MaterialAsset.h"
#endif
#ifndef GAME_OBJECT_ASSET_H
#include "T3D/assets/GameObjectAsset.h"
#endif
// Script bindings.
#include "assetManager_ScriptBinding.h"
@ -272,10 +275,16 @@ bool AssetManager::loadModuleAutoLoadAssets(ModuleDefinition* pModuleDefinition)
{
assetBase = mTaml.read<MaterialAsset>(assetDef->mAssetBaseFilePath);
}
else if (assetDef->mAssetType == StringTable->insert("GameObjectAsset"))
{
assetBase = mTaml.read<GameObjectAsset>(assetDef->mAssetBaseFilePath);
}
//load the asset now if valid
if (assetBase)
addPrivateAsset(assetBase);
{
assetBase->setOwned(this, assetDef);
}
}
}
}