- Home /
Drag Drop Inventory With GUI Buttons.
How do I make an inventory with Drag-Drop and GUI.Buttons, I know with objects, but I want to make the inventory with code. Does anyone know how to do this? What I have currently is 2 for loops which make a grid of buttons. I want it though that each can be dragged, and the corresponding Item(its an inventory, and the items are a list), is chosen.
The main thing I want to know is how to receive drag, and drop events with GUI.Buttons.
Please help/explain.
I'm still finishing my code for this and will post the entire thing once its complete, but you might be able to adapt what I've posted already @
http://answers.unity3d.com/questions/629494/c-lists-inventory-logic.html
I like to keep all my OnGUI in one script (for entire game, fairly big monster) but for this, it seemed like I had to have a second OnGUI at a different GUI depth in order to show the 'dragging icon'