GameObject.FindWithTagstatic function FindWithTag (tag : string) : GameObjectDescriptionReturns one active GameObject tagged tag. Returns null if no GameObject was found. Tags must be declared in the tag manager before using them. // Instantiates respawnPrefab at the location
// of the game object with tag "Respawn" var respawnPrefab : GameObject; var respawn = GameObject.FindWithTag ("Respawn"); Instantiate (respawnPrefab, respawn.position, respawn.rotation); |
