I had a simple script that used the command FindGameObjectsWithTag to find game objects with the tag “Ally”. But, weirdly, it also found objects with the tag “Dead Ally”. After putting a Debug.Log to check if those objects with the tag “Dead Ally” actually had “Ally”(they didn’t obviously, they were “Dead Ally”), it fixed itself, and only added the right ones. How?? How does putting a Debug.Log change anything? I similiar situations happen some other times, and I don’t know what this means?
It’s probably safer to use single word tags with the camel type notation.
DeadAlly. I haven’t experienced this because I only use single word tags.
I guess I’ll try changing the tags. However I still find this to be very strange.
Sounds like a Unity bug. I’d report the issue. Like fire7side I’ve never run into this probably because I don’t include any spaces in my tags, but a quick search of the Unity documentation shows several examples of using multiple words with spaces between them as tags.
Yeah just use single words for tags to be sure. That’s what I do.
I suspect Unity has a bug or perhaps feature that has a successful result if the tag word is found within the tag string space delimited.
It could be a way of putting more than one tag within the tag variable in a GameObject but it fixing itself after Debug.Log is unusual.