So iv been stuck for 3 days now trying to figure out how to set up a simple inventory system with stacking and a limit, also dropping. Even with making 2d games in python i could never grasp the concept. And i dont want to just download a script, i want to learn. I have been trying to set one up with a List and the ui system in unity. where say i hit a tree and i add 1 wood to the list. but then i would have to face having items in the list being duplicates. Iv read about enums arrays but i dont completely understand enum arrays yet, iv read around but i cant find a source that can make me understand it. so what im asking is how ho Inventory systems work and can enum arrays be usefull with them. sorry if im violating the rules by asking this but im really stumped.
I was looking for the drag & drop possibility for my application then I found this tutorial :
Unity Tutorial - Drag & Drop Tutorial - YouTube (Not mine)
With this tutorial, you will be able to drag & drop easily the assets from your UI.
If you have some basis in algorithm, you will be able to understand the complete mechanics and how to improve these scripts in order to respond to your goal.
I think you will be easily figure out how to stack objects (use individual slot and not layout), etc.
Hope it will help you.