Search Unity

Hierarchy objects randomly move

Discussion in 'Editor & General Support' started by supadupa64, May 24, 2016.

  1. supadupa64

    supadupa64

    Joined:
    Feb 20, 2016
    Posts:
    175
    Why do my objects in hierarchy move to random spots by themselves?

    I keep moving objects in my hierarchy to organize them and then I come back after I push play or something and they usually go back to the same spot before I moved them.
     
  2. Brity

    Brity

    Joined:
    Feb 27, 2016
    Posts:
    116
    you should put the unity version in the title.
     
  3. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,820
    Are you sure the items are actually moving? Sometimes if you hit play the hierarchy automatically collapses / expands certain items. Then it returns to normal when exiting play-mode. This can give the illusion that things are moving around in the hierarchy.
     
  4. supadupa64

    supadupa64

    Joined:
    Feb 20, 2016
    Posts:
    175
    I'm using Unity 5.3.2. Yeah, they do move around during play, but I'm talking about objects in the hierarchy moving to a certain location every time. I have to move the ones that keep moving into a groups so they would get out of the way of my order. It may be worth noting that I have probably 30,000-40,000 objects in my hierarchy.
     
  5. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,820
    This happens to me too when using Transform sort in the hierarchy.
    I switch to alphabetical sort instead, and the issue doesn't happen.

    Also, I remember there was some bug where if you called "DontDestroyOnLoad()" when in the editor, it caused something to happen with the hierarchy order. I cant' remember all the details of this.
     
    Last edited: May 24, 2016
  6. supadupa64

    supadupa64

    Joined:
    Feb 20, 2016
    Posts:
    175
    Hmmm...
     
  7. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,820
    Yeah, I switched back to Transform sort.
    In my code, I commented out all DontDestroyOnLoad() statements.
    Now the hierarchy does not changed.
    So for some reason, when using Transform soft along with DontDestroyOnLoad, it causes stuff to move around in the hierarchy.
    I suspect this has to do with unity fixing this severe bug:
    https://issuetracker.unity3d.com/is...nload-this-if-alphabetical-sorting-is-enabled
     
  8. supadupa64

    supadupa64

    Joined:
    Feb 20, 2016
    Posts:
    175
  9. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,820
  10. supadupa64

    supadupa64

    Joined:
    Feb 20, 2016
    Posts:
    175
    Is there some kind of cache system in Unity? I feel like because I have so much going on in my scene Unity has a problem with remembering and adjusting things that have been in place for a while. I use to click on objects in the scene and it would freeze the editor and I'd have to restart. That all stopped when I organized tens of thousands of objects in my scene. I currently have an audio clip if disabled it lags my play. I figure if I bake the scene or organize more objects it would stop the lag.