get current object name unity code example
Example: unity get object by name
function Update() { var enemy : GameObject = GameObject.Find("enemy"); //perform operations on enemy here}
function Update() { var enemy : GameObject = GameObject.Find("enemy"); //perform operations on enemy here}