Obtaining a string from gameobject tag?

Hey guys

var Object1 : GameObject;
var Name = "";

function Update () {
Object1 = GameObject.FindGameObjectWithTag("Slot1"); 
Name = Object1.ToString(); 

Im trying to obtain the name of the original gameobject which was found through a tag.
Code seems to work and all, although it does not return the name properly. The name returned does contain the game object’s name but also “(UnityEngine.GameObject)”.

I’ve tried to replace it the name with, Name.name = Name.name.Replace(“(UnityEngine.GameObject)”, “”);

but didnt seem to work.

Am i missing something simple here, can this be done?
Also, when i print or translate it into text, the unityengine.gameobject text is ‘tagged’ along.


Name = Object1.name;