Search Unity

Using 'Empty' in hierarchy to organize GameObjects, bad practice?

Discussion in 'Editor & General Support' started by litchlynn11, Oct 16, 2019.

  1. litchlynn11

    litchlynn11

    Joined:
    Oct 14, 2019
    Posts:
    3
    Since I'm unable to directly create a folder in the scene hierarchy, i resorted to creating Empties, renaming, then using them as a method of organizing my GameObjects, i'm wondering if this is bad practice or not?
     
  2. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    It is the best solution according to Unity Learn's John Lemon's Haunted Jaunt tutorial:
     
    zanouk likes this.
  3. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
  4. It is the best solution as long as you don't care about performance. Last time I checked, Unity transform-functions (moving, resizing, etc) are multi-threaded. They span a thread per root game objects in the hierarchy. If you put every stuff in a single root, then you are basically choking the engine, allowing to do the work on a single thread.
    This does not matter in an average super mario-clone or in a flappy bird clone, obviously. It is just something good to know about. If you try to achieve anything performant, move out the neatly organized game objects from the common parent during run-time at least.
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,620
    Last edited: Oct 17, 2019
    yektasarioglu and Lurking-Ninja like this.