How to create item database?
In my game i want to have different items and want to store all of them in single prefab as array. But i fail to even decide how to make it easily editable. Please advice, how can i achieve:
be able to add array items in inspector
have item properties as a table
optionally would be cool to be able to display preview of assigned model
Is it property drawer or custom editor? Or may be i should create whole custom window? I'm very newbie with unity..
I also don't know what would be better - to store custom classes in this prefab, or instantiate those custom classes at runtime with properties from this database.
I recommend you read up on ScriptableObjects: https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/scriptable-objects - they are Unity's data container class specifically designed for tasks like this.
Your answer
Follow this Question
Related Questions
Unity Editor - Group Public GameObjects 0 Answers
GUI.Window. Wanting to allow clickthrough 0 Answers
Custom Inspector Script Resetting Information 0 Answers
CustomEditor on Inspector, Text too big to be fully rendered 0 Answers
Is there a way to live-update script-controlled UI formatting in the editor? 0 Answers