GUI Inventory management system

Hi all.

How can an inventory system be made so that for example the player walks around and collects a cube and on the empty slot a cube is shown (realize that I should use textures in here). Declaring an array while specifying the exact number of GUI slots? Any example? Hope I’ve explained well.

Thanks.

Well, the first thing one would do is to find an inventory system…

http://forum.unity3d.com/threads/98893-Here-is-a-drag-and-drop-inventory?highlight=inventory

Amazing what searches do on the forum.

The second thing, one would do is develop a system in which one “picks up” an item by walking over it. I suggest any item that you can pick up have a code that says “If something is in my trigger and can pick me up, pick me up…” I would further add… " when that person hits ‘A’ key"

Then the object says, I have a person here with the “Player” tag and he has pressed the “Pick me up” key… send him a message that says “PickMeUp” and sends the object that is to be picked up.

Now, we simply add that object to the inventory. we can even specify a texture during this process to accommodate the inventory screen. Once picked up, we simply destroy the object in the scene. (or keep it disabled so that we can use it later)

Later on, we can drop the item back into the scene. All we would have to do is either know the object we had, or the prefab to the object.

Hi and thanks for the response.

First of all, the search function. Should’ve been looking more and I apologize for posting this topic without searching first. Won’t happen again.

Now, about the link you gave me, been trying it out and till where I’m at it’s working nice, hovering the object, the inventory system displays, when the object is clicked it displays the texture. But gets an error, something :

MissingReferenceException: The object of type ‘Transform’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.

Now, what I’m guessing that I’m mistaken is the gameObject and the Prefab slots that are created when dragging the AddToInventory script. What should be assigned to these slots?

Thanks.

I got the best information regarding GUI inventory management system here and now tell me about the inventory management software which I use named Orderhive.