Download

Recommended way to keep asset lists for dynamic access in Unreal

We have a character creation system which is almost complete. What we need now is a mechanism to feed it the proper assets to generate the character from.

The way I’ve done this in the past is by keeping at least two data bases(usually simple lists), one to map IDs to asset paths and another to describe the asset itself(item name, description, etc). The game would list the latter and then use the former to load the asset once a choice was made. The downside is having to manage these lists, which probably includes writing custom tools to generate them(I wish to avoid that).

I wonder whether there’s a built-in or recommended way to deal with this rather common problem in UE4. So far my solution is to use cvs files to build the lists. Based on the documentation, another approach would be to use object libraries and follow some conventions when building the hierarchy. I need more than just the asset paths however(item name, description, stats), and I need to save this information to rebuild the character later. What is the best/proper way to keep a data base of assets or asset paths for dynamic loading said assets at runtime in UE4?

You can’t really avoid the step of generating / storing the extra game-specific data somewhere. Data Tables (generated via csv) are probably a good way to store bulk information like that - alternatively, each object that can be used inherits from a class that provides that data. Hard to say which is the best approach without knowing the system - but the former is probably better.

You can load assets based on their types, where they are, or other concepts using the Asset Manager - ultimately however, you will still have to do some degree of categorisation.

https://docs.unrealengine.com/en-us/…ssetManagement

Thank you very much for your attention, TheJamsh, and Merry Christmas.

After weighting my options I decided to just use Data Tables. They work well in this situation and Unreal makes it quite easy to load and work with them.

TSoftReference structs are supported by Blueprints.

Look into using asset manager and asset registry. If you tag your assets correctly, you should be able to discover and load assets without storing any additional path data.