Look, I got the following error.
My script:
if(gameObject.FindGameObjectsWithTag("selected") != null) {
gameObject.FindGameObjectsWithTag("selected").tag = "component";
}
The error:
BCE0019: ‘tag’ is not a member of ‘UnityEngine.GameObject’.
The script reference says:
GameObject.tag
var tag : string
Description
The tag of this game object.
A tag can be used to identify a game object. Tags must be declared in the tag manager before using them.
gameObject.tag = "Player";
So, what’s wrong with the code above?