Find the tag of an object

Hello everyone I wanted to know how to find the tag of an object : i have a script attached to the camera and i wont do an action if the finded tag is “Terrain” , another if is “Home” how can I do??

Simple to look up in the documentation:

I know this, I want to find the tag of an objetc, there was a function that allowed you to find a tag of an object from another

GameObject.FindGameObjectsWithTag ( tagName );

Is that what you mean?
otherwise what madMarine posted gives you the tag of an object
If you don’t know what object your dealing with and you don’t know what tag you want… then how would you (yourself, not a computer) find that object in the first place?

I’m making a game and pressing the left mouse button deletes objects and also the Terrain and i do not want delete he terrain but everything else