Basic Transient and Permanent loading via the AssetManager
YarrAssetManager.h, YarrAssetManager.cpp
Inline Pirate Spawn Actions
- Create a new class that inherits from
UPrimaryDataAsset
From PrimaryDataAsset.h
/**
* A DataAsset that implements GetPrimaryAssetId and has asset bundle support, which allows it to be manually loaded/unloaded from the AssetManager.
* Instances of native subclasses can be created directly as Data Assets in the editor and will use the name of the native class as the PrimaryAssetType.
* Or, blueprint subclasses can be created to add variables and then subclassed again by Data Only Blueprints that set those variables.
* With blueprint subclasses, use Data Only Blueprints (and not Data Asset instances) to properly handle data inheritance and updating the parent class.
*/
- Define your asset type in
DefaultGame.ini
under[/Script/Engine.AssetManagerSettings]
+PrimaryAssetTypesToScan=(PrimaryAssetType="PiratePartData",AssetBaseClass="/Script/Yarr.PiratePartData",bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game/Pirate/Data/Parts")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
TIP: Use the editor to define your asset type in the config files and restart.
showdebug yarr
AssetManager.DumpLoadedAssets
AssetManager.UnloadPrimaryAssetsWithType PiratePartData
Bugrimov Maxim for this amazing Pirate Asset Pack!