Tools

Naming convention

cabinet

Just created an asset.
Don’t know how to name it…Don’t know where to put it…
So it’s a naming convention that you need.

naming convention

A good search bar is enough you say?
Still. A good folder structure would help.
And naming assets consistently won’t hurt.


What naming convention should I use in Unity?
Where do I put things?


What naming convention should I use in Unity?

Use PascalCase (ThisIsAnExample) when naming files but also in code for classes, methods, public variables and properties.

Use camelCase (thisIsAnExample) when naming local variables, parameters and _camelCase for private variables.

This is inspired by Microsoft’s C# guidelines.


Where do I put things?

Folders structure

  • 3rd-Party – Anything from the Asset Store that has it’s own stucture
  • Animations
  • Audio
  • Materials
  • Models
  • Plugins
  • Prefabs
  • Resources
  • Textures
  • Scenes
  • Scripts
  • Editor
  • Shaders

Scene structure

  • Management
  • UI
  • Cameras
  • Lights
  • World
    • Terrain
    • Props
  • Runtime

Now go clean your room.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.