Loading lessons...
Project Configuration & Folders
Project Configuration & Folders
Unity projects require a clean folder structure and correct configuration files for collaboration and version control.
Default Project Folders
When you create a new Unity project, several folders are generated:
- Assets: Contains all your game files (scripts, textures, models, scenes). This is the only folder you should edit directly.
- Library: Local cache where Unity stores converted target format assets. Do NOT include this in version control.
- ProjectSettings: Contains configurations for physics, tags, input, and player branding. Must be included in version control.
- UserSettings: Local editor layouts and preferences. Do NOT commit this to version control.
Special Folder Names
Unity treats folders with specific names differently:
- Editor: Scripts placed here run inside the Unity Editor and can use
UnityEditorAPIs. They are ignored when compiling the final build. - Resources: Assets placed here can be loaded dynamically in code using
Resources.Load(). Avoid using this for large games to prevent memory issues. - StreamingAssets: Files here are copied directly to the target build folder with no compression or conversion. Useful for video clips or database files.
- Plugins: Used to store external third-party SDKs, precompiled DLLs, or native code libraries.
Version Control Integrations
Unity integrates with Git, Plastic SCM (Unity Version Control), and Perforce. To configure:
- Go to Edit -> Project Settings -> Version Control.
- Set the mode (e.g. Visible Meta Files).
- Ensure
.metafiles are always committed. Every asset has a corresponding.metafile containing its GUID; deleting or losing meta files breaks asset references.
TL;DR
- Assets and ProjectSettings must be committed to version control.
- Keep Library, UserSettings, and Temp out of version control (.gitignore).
- Special folders (Editor, Resources, StreamingAssets) have unique compile behaviors.
- Always preserve
.metafiles, as they track asset UUIDs and links.