Asset Manager
For the asset manager to pick up your item data base and for several tools to function correctly, you must set up the asset manager per project.
Go into Projects Settings.
Under the "Game" category, select "Asset Manager".
Add a new index and set "Primary Asset Type" to "Items", set the asset base class to DA_CoreItem, then go into Directories and add all locations where you might store your items (This also searches sub folders).
(Optional) If you are using the crafting system, you will also want to add another index and set "Primary Asset Type" to "CraftingRecipes", set the asset base class to DA_CoreCraftingRecipe, then go into Directories and add all locations where you might store your recipe's.
Adding custom asset types
Inside your item data assets, you can see in the Developer Settings there's a "Asset Registry Category" variable. The default is "Items", just like the asset type we just set up in the asset manager.
You are able to either change the default for children of DA_CoreItem to be something unique, or change it per-item. If you have massive item data bases (500+ items), it is recommended to organize your data base using custom asset types.
Whatever you fill in inside of Asset Registry Category, you will need to follow the above steps, but replacing the Primary Asset Type with whatever you put into Asset Registry Category. You also must save the data asset manually after the change.
Validating
To validate your items are being discovered correctly, I suggest going into the ItemEditor and hitting Refresh near the bottom left. You can also search for your item and if it appears, then the above steps have been done successfully.
If an item is not appearing there, either the above steps were not followed correctly or the asset manager is ignoring it for some reason. If you go into "Windows" and open the output log and find any "Ignoring PrimaryAssetType Items - Conflicts with SOMECLASSNAME - Asset: ITEMNAMEHERE" in your message log, it means no data has been changed inside of your data asset or it is identical to another data asset.
Limitations
As of 5.1, there is still no way of mixing normal and blueprint data assets, for now you can only have normal data assets, and you can't do a lot of hierarchy setups. All of your parent files must live at a C++ level. Because the item data asset variable inside FS_InventoryItem lives in C++, there is no way to reference blueprint data assets. If you check "Has Blueprint Classes" the system will not work.
Bulk Editing
You'll sometimes find yourself with tons of items and need to modify a large amount of items. This is where a good folder hierarchy setup is essential. In the example project, every item is in its own folder, but all of those folders are inside Items folder. If you go into the Items folder, find the filter on the left of the search bar and go into Inventory Framework -> Item Asset you will see every item inside the example project. If you select multiple, then right click and go into Asset Actions -> Bulk Edit Via Property Matrix, you'll find the property matrix editor.
Last updated