- Home /
I keep getting an error when try to change the tag of a gameObject
as title say.
Basically I was trying to do this:
gameObject.tag = "Default";
And I get this error:
Tag: D is not defined
Basically it just take the first letter of the string, no matter what the string is, it only works if I create a tag with one letter name.
Also I tried using it in a different project and I get the same error, so maybe is a Unity bug? I'm using 5.5.2f1 version.
Comment
Best Answer
Answer by SohailBukhari · Mar 22, 2017 at 02:59 PM
@username Default is keyword and default is predefined tag So you cant give tag to any gameobject with string "Default".
Your answer
Follow this Question
Related Questions
ground detection fails 0 Answers
In-App-Purchases not working (Android) 1 Answer
Coroutines white death causes? 0 Answers
Unity Android fetching wrong screen resolution 1 Answer
Multiple Cars not working 1 Answer