referencing a gameObject with it's own script

Hello all,

I’m having trouble with something very simple:
I want to reference a game object with it’s own script.

public class ItemScript : MonoBehaviour

    public Inventory inventory;
    public ItemType type;
    public Sprite spriteNeutral;
    public Sprite spriteHighlight;
    public int maxSize;

	private void OnCollisionEnter (Collision other)
		if (other.gameObject.tag == "Floor")
            inventory.AddItem(this); //here I want it to add this item
            LogManager.AddLine("Object is picked" +; //here I want it to get the name of this game object
            Destroy(gameObject, 3);


Haven’t tried it yet but might work. should work, if not you could always tag it end log the gameObject.tag

Or , if you are trying to reduce engine calls just set a string with the name and log that string.