Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to Get/Set Hierarchy Order

Discussion in 'Scripting' started by LightStriker, Dec 2, 2014.

  1. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    I got a weird one.

    We all know in 4.5, the Hierarchy window is now sorting GameObject by the order they exist in their collection/serialization, which in turns affect how they are rendered; mostly used for the new GUI.

    However... How do I get or change that order in code?

    Not how the window display the order, but I want to modify the GameObject order.
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
  4. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Maybe their hard drive was almost full :)