- Home /
Drag and Drop Inventory System?
Hi this is a bit of a long winded question so I am going to apologize in advance.
So basically I'm wondering what the exact theory behind setting up a drag and drop inventory system. how would one have it that GUI buttons can be pressed and held and if the mouse button drops the held item into a new GUI button things would happen? such as the new slot taking the item and the previous one deserting it?
Is this possible with GUI Buttons first of all? If it is but there is a simpler method could someone point me in the right direction? I have seen some systems out there, but they are not explained they are just scripts, I would much rather understand the system and write my own scripts accordingly.
and lastly does one think this would be easier to do in a separate scene using game objects? Thanks guys you are all always helpful so I have no doubt that I will have the system working by the end of the week
Answer by Chris D · Jul 15, 2011 at 12:15 AM
There's a nice video tutorial I found here. It seems to have the basic structure for a GUI inventory system explained in detail (haven't watched the whole thing, but looks decent enough).
For drag and drop, there are a number of similar questions so I'd look through them (though it sounds like you may already have done so) and also check out this script on the wiki. It specifically makes GUI elements dragable.
I have set up a basic inventory system >.< I used other references but thanks for the link :)
The script you linked on Wiki has helped me though I am throwing something together when it is done I will post it here so you guys can see (for interests sake)
Do you guys have an alternative for those links? It seems that the user removed the tutorial and unifycomunity is down due to hackers.
I am in a loot of trouble here, no source of information. :/