Simple inventory

I try to implement simple inventory system. And stuck on pickup functionality.
Example of taking the Potion:

  1. Collide with Potion object.
  2. Add it to the Inventory
  3. List item Remove it from the scene

How to implement this? At the step 2, i must take reference to asset or prefab?
Inventory must store a GameObject’s ?

Any idea, resource or tutorial will be helpfull.
*I need to implement exactly this algorithm.


  1. You must create a Potion.

  2. Create for example 3 slots Inventory.

  3. When you collide with Potion, his script must SendMessage to 3 slots. When 1 is free, potion comes to 1, when 2 is free, potion comes to 2, etc…

  4. Script Potion must have information:

    var ob : GameObject;
    var ob2 : GameObject;
    var ob3 : GameObject;
    function OnTriggerEnter(other : Collider){

    ob2.SendMessage("Slot"); //Call function "Slot" (he place your potion to inventory)
    Destroy(gameObject);  //Destroy Potion

So - you already know how to do it?

Sorry for my English ;d