How to change Tag by scripting?
I want if enemy dead, I want to change its tag from [enemy] to another or untagged. Thus become no more enemy.
Can I do this?
How to change Tag by scripting?
I want if enemy dead, I want to change its tag from [enemy] to another or untagged. Thus become no more enemy.
Can I do this?
As long as the Tag exists, you can access and set it with:
transform.gameObject.tag = “SomeTagName”;
Does it have to have the transform infront of the GameObject ?
Or can it be gameObject.tag = “SomeTagName”; ?
Either way is fine.
Thank you!!!
This one goes in the necroposting hall of fame
It’s probably a bot.