unity you can access tag from gameobject and transform code example Example: Transform.FindObjectwithtag Object1 = GameObject.FindWithTag("Cube").transform;