Get the GameObject reference attached to a script

Ok, my problem is:

I have a prefab with a custom tag applied. On this prefab I have attached a script which finds all GameObjects with this tag and then does something on them. Now my problem is that I dont want to do this if the object currently selected is the same as the one the script is attached to.

Is there a way for me to get the reference of the gameobject to which the script is attached ? Without having to name all of the objects, and without adding the gameobject as a variable in the script.

Every component has a variable called gameObject which is a reference to the GameObject that the component is attached to.

Of courseā€¦ Thanks mate :slight_smile: