Project structure best practices

Tulenber 14 February, 2020 ⸱ Beginner ⸱ 2 min ⸱

As soon as you press the "Create" button, the battle will begin - the battle for your comfortable life.

The initial project structure will directly affect the pain that you will experience while working on the project. And if you lose control, trying to put everything back in order can break your project for an extended time if you even dare to do it.

Project structure

Unity, like any other development tool, has a range of different types of resources, which used for the project. So after looking around the community, you can come to the following structure:

  • Animation
  • AssetStore
  • Audio
    • Music
    • SFX
  • Bundles
  • Materials
  • Models
  • Plugins
  • Prefabs
  • Resources
  • Sandbox
  • Scenes
    • Levels
    • Other
  • Scripts
    • Editor
  • Shaders
  • Tests
  • Textures

Theoretically, there can be additional directories like Maps or Tilemaps if you use it. Still, before adding something to the root of the project, you must think about it very hard. Also, never ever ever add any assets to the root directory.

Naming convention

Every project needs a naming convention. That’s why it hardly find two projects that use the same, so write your own and force everyone who commits to your project use it, or you will be in one step from hell.

Asset Store

Boromir

For assets from the store, let’s use the AssetStore directory. Very often, that assets contain a few versions of content, example scenes, speech from the author, and much other trash. That’s reasonable not to get it all to the project. But you can’t just download an asset from the store; fix and put it to your project. Instead, you need to create a new empty project, import assets there, prepare it, and export by "Assets->Export Package…“. Don’t forget to place original files somewhere just in case.

Sandbox

It’s a fascinating idea to use the Sandbox directory to do experiments, so if something goes wrong, you can clear it and forget or optimize it for real usage.

Asset Bundles

Another good idea to use Bundles for downloadable content, so handle it, become much more straightforward.

Conclusions

At the end of the day, the best advice will be: “Use what works for you.” If your structure effectively works for the development and new team members adapt quickly, then what the difference in how you name your directories. See you next time! =)



Privacy policyCookie policyTerms of service
Tulenber 2020