I have a list of game object. I want to compare clicked object with 1st position of the list.
If the compared objects are the same destroy it.
I got a gamemanager script
public List Objs = new List ();
I got another script called items which has this
GM = GameObject.Find (“items”).GetComponent();
}
void OnMouseDown()
{
Destroy(gameObject);
}
how to check in item script if clicked object == Objs (1)