Legacy Documentation: Version 5.5
IME in Unity
Exporting Packages

Special folder names

You can usually choose any name you like for the folders you create to organise your Unity project. However, there are a number of folder names that Unity interprets as an instruction that the folder’s contents should be treated in a special way. For example, you must place Editor scripts in a folder called Editor for them to work correctly.

This page contains the full list of special folder names used by Unity.

Assets

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

Editor

All scripts that are placed in a folder called Editor (or a sub-folder within it) are treated as Editor scripts rather than runtime scripts. These 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 the exact location of a given Editor folder affects the time at which its scripts will be compiled relative to other scripts (see documentation on Special Folders and Script Compilation Order for a full description of this). You can use the EditorGUIUtility.Load function in Editor scripts to load Assets in a Resources folder, placed inside an Editor folder. These Assets are only loadable via Editor scripts, and are stripped from builds.

Note: Unity does 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 looks for the Asset files in a folder called Editor Default Resources, which your should place 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. You must place the image file used to draw this icon in a folder called Gizmos in order for it 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 functionality that are is provided by Unity out of the box. You must place Plugins in a folder called Plugins for them to be detected by Unity. Like the Editor folder, this affects the order in which scripts are compiled. See Special folders and script compilation order for further details, and Plugin Inspector for more information on plugin platform control.

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. If the Resources folder is under a folder named Editor, then the Assets in it are loadable from Editor scripts but will be stripped from player builds.

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 is copied unchanged to the target machine, where it is then available from a specific folder. See the page about Streaming Assets for further details.

Hidden Assets

During the import process, Unity completely ignores the following files and folders in the Assets folder (or a sub-folder within it):

  • Hidden folders.
  • Files and folders which start with ‘.’.
  • Files and folders which end with ‘~’.
  • Files and folders named cvs.
  • Files with the extension .tmp.

This is used to prevent importing special and temporary files created by the operating system or other applications.

IME in Unity
Exporting Packages