- Home /
Inventory, Items and Equipment: is there a good way to make them?
My question might not be very appealing, but it's quite simple:
Is there a good/easy way in Unity to make an expendable item class. Say I want to make a TON of different items/equipment, with specific stats and sprites.
I've considered ScriptableObjects, because they allow me to specify some values and a sprite too, but I'm afraid it might get too heavy. Also thought about XML/JSON, but I'm not sure about that either.
I know there's not a 'general good way' to do this, but I was just eager to learn more about this subject.
Can anyone help? Thanks in advance!
Answer by orb · Sep 18, 2014 at 12:03 PM
Don't be afraid of ScriptableObject-based inventories. The benefits outweigh any perceived drawbacks, in my opinion, but the list in this answer shows some pros and cons to help you decide. There should be no worse performance, as they're just classes which don't get added to the scene hierarchy. Keep them in a dictionary for quick lookup, and they shouldn't feel heavy.
This helps a lot, thanks! Didn't came across that question in my search, but it looks like a good read. Now I just need to figure out which method to use, but that will be something I'll have to figure out myself. Thanks again!
Answer by StarCrossedGaming · Sep 18, 2014 at 11:43 AM
Brackeys made a free Inventory System within the Asset Store of Unity, If your game is Singleplayer, That is the perfect result for you. If you have any more questions, Feel free to ask.
Thanks!
Thanks for the quick response. I'm sorry if I was unclear, but this is not really what I'm looking for. I know of the Brackeys Inventory System and I think it works great, but I'm really just looking for some background on an Item database/Good way to make 'new' items. $$anonymous$$now any leads? Thanks!
Answer by ik1602 · Feb 23, 2015 at 01:02 PM
Try our free asset Diabolic RPG Inventory - Free http://goo.gl/gn68Hj
Your answer
Follow this Question
Related Questions
Access Inventory from player 1 Answer
stack by quanity...? C# 2 Answers
Checking Item class 1 Answer
How to set up a gui text box to count inventory items? 1 Answer