Search Unity

New to Unity - Organization

Discussion in 'Getting Started' started by nreeves, Jan 11, 2017.

  1. nreeves

    nreeves

    Joined:
    Jan 11, 2017
    Posts:
    2
    This might be a weird question but I am looking for feedback on how to keep my Unity directories / files organized to make my learning experience with Unity as painless as possible. I generally don't get a lot of time to mess around with Unity so I was wondering if you guys were interested in posting how you layout your tabs and such to make game development as efficient as possible.
     
  2. SarfaraazAlladin

    SarfaraazAlladin

    Joined:
    Dec 20, 2013
    Posts:
    280
    In terms of folder organization, it's a good idea to make a root folder for all of your own work in the asset folder. That way, if you download any third party stuff from the asset store your own folders don't get mixed with the ones you import into your project.

    So you would have:
    Assets/ Your Folder/ all of your work somewhere in here

    Aside from that, it really depends on your project and your preferences, and weather or not other people will work with you on the project.
     
    Ryiah and aer0ace like this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    By the way when choosing names for folders that are directly under the Asset folder you will want to verify that they don't match any of the reserved folder names unless you specifically want the functionality of that folder.

    For example normally Unity does not include assets in published builds if the asset is not used in any scenes but any assets placed within the Resources folder will always be included. This can be useful at times but it can also bloat the build.

    https://docs.unity3d.com/Manual/SpecialFolders.html
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    You mentioned tab layouts within the editor, so I'll share mine. It can vary depending on what I'm doing. Like if I'm setting up character animations, the Animator and Animation windows would have more priority. But my basic layout (called "Schneider") is usually something like this:
    layout.png

    Experiment a bit. Move things around, and pay attention to which windows you're using often, and what other windows have relevant information to that (so you don't have two windows in the same shared space when you want to see them both).
     
    Kiwasi and SarfaraazAlladin like this.
  5. Deleted User

    Deleted User

    Guest

    Here is my favourite layout; one thing I know about layouts though is none is "the best", you'll have to use other ones during the course of your work:

    Capture.JPG
     
    Kiwasi likes this.
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    There are two basic strategies for folder structure.

    You can organise by entity, all enemies go in one folder, all of the player stuff goes in another. And so on.

    Or you can organise by type. All scripts go in one folder. All models in another. And so on.

    In practice I use a combination of both. The top level is sorted by types. The next level via entity/system. Something like

    - Scripts
    - UI
    - Player
    - ...
    - Art
    - UI
    - Player
    - ...
    - ...
     
    Ryiah likes this.
  7. Sylkie

    Sylkie

    Joined:
    Mar 21, 2013
    Posts:
    3
    What BoredMormon said. One more trick you can play for organization, in order to keep your paths shorter, is to decide on a naming convention for your files that includes a descriptive prefix. For example:

    /Scripts
    uiStartMenu.cs
    uiOptions.cs
    uiWin.cs
    uiLose.cs
    mainLevelManager.cs
    mainAudio.cs
    plyCharacterAnim.cs
    plyInventory.cs
    enmCharacterAnim.cs
    ...
    /Resources
    mdlPlayer.mdl
    mdlEnemy.mdl
    mdlBroadsword.mdl
    imgMainMenuBG.png
    imgSkyBox.png
    audBackgroundMusic.mp3
    audWinMusic.mp3
    fxFootsteps.mp3
    fxDoorOpening.ogg

    etc...

    Notice that the prefix will keep your files alphabetically organized by usage. It makes finding things much faster, and doesn't leave you with a hundred directories to search through.
     
    Ryiah likes this.