x


how to check if an object has no tag?

how do you check if an object has no tag?

more ▼

asked Nov 01 '10 at 01:01 AM

Diet Chugg gravatar image

Diet Chugg
229 23 28 36

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It's impossible for a gameobject not to have a tag. If you haven't assigned one, the default value for the tag is "Untagged". (Which is sort of a lie, but eh.)

more ▼

answered Nov 01 '10 at 01:06 AM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

(comments are locked)
10|3000 characters needed characters left

Every gameobject has a tag. The default tag is "Untagged" If you compare the current tag to "Untagged", you should get the desired result

more ▼

answered Nov 01 '10 at 01:07 AM

Atnas1010 gravatar image

Atnas1010
1.1k 6 10 26

Thanks for the help. I thought I tried that but it didn't work. I used "UnTagged" instead of "Untagged".

Nov 01 '10 at 01:11 AM Diet Chugg

Glad you got it working :)

Nov 01 '10 at 01:16 AM Atnas1010
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1095
x325

asked: Nov 01 '10 at 01:01 AM

Seen: 1540 times

Last Updated: Nov 01 '10 at 01:01 AM