Good day.
I need to check all time some objects in the scene to show some information in a canvas. But i want some organization of that info, Before start scripting and wasting dozens of hours, i should want to know this, because maybe i need to do it by other way, and not by FindObjectswithTag() so…
–
As the title says, when you use FindObjectsWithTag(), unity returns an array withh oll objects in the scene with that tag, but in which order? Is always the same?
–
3 little questions using this example:
–
If i use FindObjectsWithTag, receive an array with 4 elements. Then use FindObjectsWithTag again. Will be the 4 elements in the same order? Then Instantiate() 2 more objects with that tag in the scene and use the FindObjectsWithTag agan. What index in the array will have that 2 new objects? And then delete the 3 first objects of the array and use again FindObjectsWithTag. Will the last 3 elements remain in same order between them?
So, the big question is the title itself, What order use unity to select the elements of an array when using FindObjectswithTag()? Maybe Positions, alphabet, some UnityObjectsID, or something mysterous?
Thanks in advance! Will Upvote and accept best answer