I am storing a string array of the name of my Tags. Now I am trying to dynamicly set the tags of a group of objects when the game starts up. I can hard code them but as soon as I take the tags from the array when I look at the game object as the game is playing they say invalid tag. Is it possible to set the Tags from an array?
for (var u : int = 0; u < letterBoxArray.length; u++ ) {
var randLetter = Random.Range(0,27);
var randGameTag : String = lettersTag[randLetter];
print(randGameTag);
if (letterBoxArray[u].gameObject.tag == "letterBoxBlank") {
letterBoxArray[u].renderer.material.SetTexture("_MainTex", letters[randLetter]);
letterBoxArray[u].gameObject.tag = randGameTag;
}
}