- Home /
Easiest way to create an inventory system?
Okay so i am new to Unity and Unity's C#, and i tried to follow some tutorials on youtube about that but i didn't understood a thing. I want to make an inventory system in the easiest possible way, so you could move items around, store them in a container and maybe crafting. I need some explanations about the steps i need to follow and about how an inventory system works, not proper code. A simple list-type inventory should be also enough, i just want to understand how things work here. Thanks
EXTRA: I created a new project in Unity, created a new script, but the first 3 lines were red, like :System.Collection, Unity etc and i couldn't use thier functions... help
Answer by davidcox70 · Apr 10, 2018 at 12:30 PM
I occasionally see those red lines also. Quit MonoDevelop (the scriping editor) and re-open it by double clicking on a script in your project. That always fixes it for me. If it fdoesn't, it could be because you have something MonoDeveop doesn't like before those lines.
For an inventory, have a look at "Lists" in this tutorial. https://unity3d.com/learn/tutorials/modules/intermediate/scripting/lists-and-dictionaries
Answer by seandolan · Apr 10, 2018 at 12:39 PM
I found this to be the easiest tutorial. As you said you have tried a few so I am guessing maybe you have already seen this one:
https://www.youtube.com/watch?v=-xB4xEmGtCY
The best thing I can recommend (because I started out just like you) is to NOT try and integrate the tutorials you see into your project and don't copy and paste any of their code. Start a new project, open the tutorial in the background or on a second screen. Then do each step of the tutorial in your own project typing out the code line by line and hitting pause on the video. If there is something you see that you don't understand, check the specific Unity function in the documentation or break it down to the part you don't understand and post it on Unity Answers. I know these tips might not solve your problem right now, just sharing in the hope it does helping you progress in your development. Happy programming and good luck mate!
Best of luck buddy! You can do it! Sometimes the hardest things to learn that don't make sense at first become the strongest tool in your batman utility belt!
Your answer
Follow this Question
Related Questions
How to make an inventory for my text advenutre? 0 Answers
Which is better for an inventory system, Array or List? 0 Answers
A node in a childnode? 1 Answer
Count object list duplicates 1 Answer
[C#]Inventory script help. 3 Answers