Expands ScriptAsset behavior to operate as a generic type-settable asset

This commit is contained in:
JeffR 2023-02-23 15:29:59 -06:00
parent b6f3c25fea
commit 167f98b767
6 changed files with 50 additions and 4 deletions

View file

@ -46,6 +46,7 @@ extern StringTableEntry assetCategoryField;
extern StringTableEntry assetInternalField;
extern StringTableEntry assetPrivateField;
extern StringTableEntry assetAutoUnloadField;
extern StringTableEntry assetTypeField;
//#define ASSET_BASE_ASSETNAME_FIELD "AssetName"
//#define ASSET_BASE_ASSETDESCRIPTION_FIELD "AssetDescription"
@ -137,6 +138,7 @@ public:
protected:
virtual void initializeAsset(void) {}
virtual void onAssetRefresh(void) {}
virtual void unloadAsset(void) {}
protected:
static bool setAssetName(void *obj, const char *array, const char *data) { static_cast<AssetBase*>(obj)->setAssetName(data); return false; }