- Home /
Custom Assets, Inventory - best practice
I have a question about best practices to implement an Inventory/Crafting system.
My current idea is to implement a base "Item" (ScriptableObject) class and some classes like RessourceItem : Item
PlaceableItem : Item
MachineryItem : Item
and create custom Assets for each Item I need: ([CreateAssetMenu(menuName = "Items/RessourceItem")])
My game idea includes a pretty big crafting system, so some items (Machinery) can process items, for example a furnace can smelt something.
And thats the point where I cant decide which design pattern would be better:
1) Create a Custom Asset for each crafting recipe (as which the items) and give the Machinery class a public List and dragn&drop all needed recipes into that list.
2) Create a List like before, but instead of creating and adding different Custom-Asset-Recipes just type the recipes directly into the inspector (serialized recipe class).
Are there any advantages/disadvantages with the different approaches? Are custom-Assets even the way to go?
For crafting you should go with custom editor than custom asset.
Like Node editor for easy to make a new craft item.
https://github.com/Seneral/Node_Editor_Framework
Then you have to make a custom asset for each item. And custom editor to show how crafting work.
So, you have: - Asset for Item - Asset for recipe(made by editor)
Your answer
Follow this Question
Related Questions
Custom levels created by users 1 Answer
Project Organization and Asset Managment 1 Answer
Custom Editor: show asset folders in ObjectField 2 Answers
Setting TextAsset[] from an Editor 0 Answers
Find All Assets by Type 2 Answers