Search Unity

Bug or Not?

Discussion in 'General Discussion' started by Rasly233, Apr 28, 2020.

  1. Rasly233

    Rasly233

    Joined:
    Feb 19, 2015
    Posts:
    264
    I just noticed that hirarhy in build is in wrong order... is it ok so? is it a bug? i do something wrong?

    also is there any trick that restores order ?

    Anyway, i found that it only in wrong order when i pull by tag, so there is a way to avoid it.
    Topic can be removed.
     
    Last edited: Apr 28, 2020
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I'm not sure what you mean by "when i pull by tag". Are you talking about the order when using FindGameObjectsWithTag? If so, I don't see anywhere in the documentation that the order in the returned array is the order in the hierarchy, and when no guarantee is made you should assume no guarantee is offered, even if you have seen that behavior before. (If it is documented, then it sounds like a bug)
     
  3. Rasly233

    Rasly233

    Joined:
    Feb 19, 2015
    Posts:
    264
    i mean that i expected same result in build that i have in player, but it is not same. And yes it is about FindGameObjectsWithTag.
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Yeah, I don't believe you should assume the order in the results from FindGameObjectsWithTag will be the same in the build as in the editor.