There’s a difference which is hard to explain…very strange, it works as expected in the editor. I’m using a GameObject.FindGameObjectsWithTag() to get an array of objects, then setting some of them to a different state based on a randomized array—think flipping colors on a checkerboard, one in each column, the row is chosen randomly. It looks like the GameObject.FindGameObjectsWithTag() is returning an array that’s scrambled somehow compared to when I run it in the editor, like there’s no guarantee of the order it finds them, is that possible? If so, I suppose I would hard-code the array beforehand…but seems weird that it behaves differently.
I hard-coded the array in the Inspector and it works fine in the .exe now. I guess GameObject.FindGameObjectsWithTag() doesn’t find them in the same order in the editor versus the .exe.
There is no guaranteed order, you are correct.
1 Like