Is there a standard/recommended directory structure for Unity projects?

后端 未结 2 1116
误落风尘
误落风尘 2021-02-04 14:00

My next project will use Unity 5.6. It will be a game and that will leverage AssetBundle for remote scenes loading. New scenes will be incrementally added afterward. Therefor

2条回答
  •  再見小時候
    2021-02-04 14:08

    At the end of the day, it comes down to whatever works the best for you and makes the most sense for the project. Working on small solo projects, I've found that keeping a simple folder structure separating asset types has worked well to keep things organized (Textures, Scripts, Prefabs, Sprites, etc). Another popular method is to organize by object type:

    Animals
    ├── Crow
    │   ├── script
    │   └── sprite
    └── Snake
        ├── script
        └── sprite
    

    In my experience, organizing by Scene has generally not ended up working out well, especially in the case where assets are shared between scenes - stuff tends to get lost.

    I suggest taking some time to mess around with your organization and see what feels right for you, especially if this is your first unity project. Moving files around after you start will not break associations in the inspector, assuming you are not searching through directories in your scripts.

    If you need more help deciding, take a look at some of the links below. Link 3 in particular has a pretty lengthy discussion on this topic.

    • Mastering Unity Project Folder Structure. Level 2 – Assets Organization
    • 50 Tips for Working with Unity (Best Practices)
    • Unity Forums: Best practices - Folder structure

提交回复
热议问题