Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Organization Practices

Discussion in 'General Discussion' started by Samantha, Oct 18, 2005.

  1. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    Since I'm sure that each of us has focused on our use of Unity in slightly different ways, I'm curious about how everyone organizes their project folders.

    I currently separate my folders into individual element types. This is nice because I always know where to look for a particular asset, no matter how I have my scene organized. It's bad because if I want to add a texture to a material or a script to a prefab, some scrolling is required, and I can accidentally click on an item and lose my current info screen (unless I have it locked, which I rarely do)

    Mine basically looks like this:
    1)Imported assets
    2)Prefabs
    3)Textures
    4)Materials
    5)Scripts

    I haven't messed around with lights, GUI elements, animations, or shaders too much. Anyone who cares to should post their Project folder hierarchy and some pros and cons they have discovered while using their method. Maybe we can come to some kind of consensus of a "standard" organizational practice.

    Thanks!
    -Ulog
     
  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    The recommended way is to sort them by theme with a kind-of subfolder within it...

    Code (csharp):
    1.  
    2. Generic
    3.   ...generic meshes here...
    4.   Textures
    5.     ...textures used by generic here...
    6.   Sounds
    7.     ...sound files used by generic here...
    8.   Level1
    9.     ...level1 meshes here...
    10.     Textures
    11.       ...textures used by level1 here...
    12.     Sounds
    13.       ...sound files used by level1 here...
    14.  
    When you do this, level1 meshes can reference generic textures and Unity will just plug it correctly.
     
  3. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    I see what you mean about generic assets. Does that mean that object can refer to to other objects above them in the hierarchy, but not below?

    And you only mention meshes, textures, and sounds. Would this work?

    Generic(Meshes)
    -Textures
    -Sounds
    -Prefabs
    -Scripts
    -Materials
    -Level1
    --Textures
    --Sounds
    --Prefabs
    --Scripts
    --Materials
    -Level2
    --etc...
     
  4. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    Definately...

    You can also throw the meshes into a subfolder, and it will locate correctly...

    The only thing I would change is that when you have prefabs that are basically wired versions of you assets, I would place them up one level (outside the prefabs dir), as they are the ones you want to drag into the scene...

    Also, be aware that you can move stuff about after importing without losing file references (as long as you do it inside Unity). I often just throw everything in one folder, then clean up after initial setup is complete....