Load a subset of primary assets using the AssetManager
I'm developing a rogue-like game with levels made of random pre-defined rooms.
I'm using the asset manager to handle the levels and rooms definitions.
At the moment, all levels have the same PrimaryAssetType, and all rooms theirs.
I've placed those data assets in separate folders and configured the settings as needed. As a result, the asset manager successfully loads those assets.
Currently, I have 2 levels. At runtime, when I call GetPrimaryAssetIdList with the Level primary asset type, I successfully get 2 assets. And when I do the same for the rooms, I get all the rooms (from both levels)
So right now, when I want to load only the level 2 at runtime, I still need to load everything and filter the loaded data assets to keep only those related to the level 2.
Is there a way to only get the primary asset id list of a given level without loading everything?
I thought of creating as many PrimaryAssetType as I have levels (LevelDefinition_1, LevelDefinition_2, ... and RoomDefinition_1, RoomDefinition_2, ...) but this is not very convenient.
Maybe I can use the asset bundles for this purpose, but I must admit I can't get my head around that structure yet.
asked Aug 22 '18 at 10:25 AM in Using UE4
Follow this question
Once you sign in you will be able to subscribe for any updates here