Quantcast
Channel: Questions in topic: "gameobject.tag"
Viewing all articles
Browse latest Browse all 95

C# How to assign tag to GameObject at runtime?

$
0
0
I'm trying to create and assign a tag to a GameObject so I an access it later on, but discovering that I cannot at run time assign tags to GameObjects created. For example, if I have a loop that creates 100 GameObjects at run time, and I want to give each GameObject an id of 1, 2, 3, 4 all the way to 100. Then, later on, if I want to update object "49" at run time, how can I access this GameObject if I cannot assign a tag to it through C#? sudo code: for(int i = 0; i

Viewing all articles
Browse latest Browse all 95

Latest Images

Trending Articles





Latest Images