![]() ![]() The use-case is a basic configuration for an AI to be spawned into the world. Here is an example of a PrimaryAsset with MonsterData from my ActionRoguelike on GitHub. Virtual FPrimaryAssetId GetPrimaryAssetId() const Īn example of a PrimaryAsset is an AI configuration asset that holds info about a specific monster along with which Actor to spawn for this AI, some attributes, abilities, and perhaps some UI stuff like name and icon. * If this is valid, the object can be referenced by identifier using the AssetManager * Assets that need to be globally referenced at runtime should return a valid Identifier. * Returns an Type:Name pair representing the PrimaryAssetId for this object. You can turn these ‘secondary assets’ (Everything is considered a Secondary Asset by default) into Primary Assets by overriding GetPrimaryAssetId() from UObject.h: /** These are the assets you will manage and the system will load/unload any referenced content (also known as ‘secondary assets’) such as meshes and textures. Your project must define certain classes as Primary Assets (these may often be derived from PrimaryDataAsset but can derive from any UObject). Instead I’ll use this article to be more example-driven and from my personal perspective and use-cases. I recommend reading the official documentation page as I’ll try not to repeat too much of what is already explained there. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |