This commit is contained in:
2023-07-21 11:13:54 +08:00
2 changed files with 30 additions and 1 deletions

View File

@@ -89,4 +89,33 @@ public:
}
};
#define HGL_RUNTIME_ASSET_CLASS(RA_ID_TYPE,_RA_CLASS)
#define HGL_RUNTIME_ASSET_DECLARATION(RA_ID_TYPE,RA_CLASS) RuntimeAssetManager<RA_ID_TYPE,RA_CLASS> RuntimeAsset<RA_ID_TYPE,RA_CLASS>::RAM;
/**
* Example:
*
* MyRuntimeAsset.h
*
* using MyAssetID=uint;
*
* struct MyRuntimeAsset:public RuntimeAsset<MyAssetID,MyRuntimeAsset>
* {
* public:
*
* using RuntimeAsset::RuntimeAsset;
* };
*
* MyRuntimeAsset.cpp
*
* #include"MyRuntimeAsset.h"
*
* HGL_RUNTIME_ASSET_DECLARATION(MyAssetID,MyRuntimeAsset);
*
*/