Legacy Documentation: Version 5.2
IME in Unity
Version Control

Special Folder Names

For the most part, you can choose any names you like for the folders you create to organise your project. However, there are a number of folder names that Unity will interpret as an instruction that the folders’ contents should be treated in a special way. For example, editor scripts must be placed in a folder called Editor in order to work correctly. The full list of special folder names used by Unity is given below.

Assets

The Assets folder is the main folder that contains the assets that can be used by a Unity project. The contents of the Project view correspond directly to the contents of the Assets folder. Most API functions assume that everything is located in the Assets folder and so they don’t require it to be mentioned explicitly. However, some functions do need to have the Assets folder included as part of a pathname (eg, certain functions in the AssetDatabase class).

Editor

All scripts that are placed in a folder called Editor (or a sub-folder within it) will be treated as editor scripts rather than runtime scripts. Such scripts are designed to add functionality to Unity itself during development and are not available to the finished game at runtime. More than one Editor folder can be used in the project at once but note that the exact location of a given Editor folder affects the time at which its scripts will be compiled relative to other scripts. See the page on Special Folders and Script Compilation Order for a full description of this. Note: Unity will not allow components derived from MonoBehaviour to be assigned to GameObjects if the scripts are in the Editor folder.

Editor Default Resources

Editor scripts can make use of asset files loaded on-demand using the EditorGUIUtility.Load function. This function will look for the asset files in a folder called Editor Default Resources which should be placed directly within the Assets folder.

Gizmos

Unity’s “Gizmos” allow you to add graphics to the scene view to help visualise design details that are otherwise invisible. The Gizmos.DrawIcon function places an icon in the scene to act as a marker for a special object or position. The image file used to draw this icon must be placed in a folder called Gizmos in order to be located by the DrawIcon function.

Plugins

Unity lets you add Plugins to a project to extend the features available to Unity. Plugins are native DLLs that are typically written in C/C++. They can access third party code libraries, system calls and other things that are not provided by Unity out of the box. Plugins must be placed in a folder called Plugins to be detected by Unity and like the Editor folder, this affects the order in which scripts are compiled. See the page on Special Folders and Script Compilation Order for further details.

Resources

Generally, you create instances of assets in a scene to use them in gameplay but Unity also lets you load assets on demand from a script. You do this by placing the assets in a folder called Resources or a sub-folder (you can actually have any number of Resources folders and place them anywhere in the project). These assets can then be loaded using the Resources.Load function.

Standard Assets

When you import a standard asset package (menu: Assets > Import Package) the assets are placed in a folder called Standard Assets. As well as containing the assets, these folders also have an effect on script compilation order; see the page on Special Folders and Script Compilation Order for further details.

StreamingAssets

Most game assets are incorporated directly into the built player but there are some cases where you want the asset to be available as a separate file in its original format. For example, to play a video on iOS, you must access the video file from the filesystem rather than use it as a MovieTexture. If you place a file in a folder called StreamingAssets, it will be copied unchanged to the target machine where it will be available from a specific folder. See the page about Streaming Assets for further details.

WebPlayerTemplates

For webplayer builds, Unity lets you supply a custom host page to deliver the player. The host page is supplied in the form of a template that can incorporate specific information from the project such as its name. These templates must be placed in a folder called WebPlayerTemplates to be available to Unity; see the page about Using Web Player templates for further details. It is also worth noting that any scripts placed in the WebPlayerTemplates folder will be ignored by the compiler. Placing script files here can be a useful temporary way to stop them from being compiled, say if they contain incomplete code that will prevent the game running.

IME in Unity
Version Control