Version: 2017.1
Unity での IME
パッケージの出力

特殊なフォルダー名

原則として、作成したフォルダーには自由に名前を付けてプロジェクトを管理することができます。ただし一部、Unity に命令として読み取られる特殊なフォルダー名が存在します。これらのフォルダー名は、そのフォルダー内のコンテンツが特定の方法で扱われるよう指定する機能を持っています。例えば、エディタースクリプトが正しく機能するためには Editor フォルダーに置く必要があります。

このページには Unity で使われる特殊なフォルダー名の完全なリストを掲載しています。

Assets

Assets フォルダーは Unity プロジェクトで使用するアセットが含まれている主なフォルダーです。Project ウィンドウのコンテンツは、Assets フォルダーのコンテンツに直接呼応します。ほとんどの API 関数はすべてが Assets フォルダーにあることを前提とし、そのことを明示的に言及することを要求しません。しかし、関数のなかには Assets フォルダーがパスネームの一部として含まれることを必要とするものもあります (例えば、AssetDatabase クラス内のある関数)。

Editor

Scripts placed in a folder called Editor are treated as Editor scripts rather than runtime scripts. These scripts add functionality to the Editor during development, and are not available in builds at runtime.

You can have multiple Editor folders placed anywhere inside the Assets folder. Place your Editor scripts inside an Editor folder or a subfolder within it.

The exact location of an 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). Use the EditorGUIUtility.Load function in Editor scripts to load Assets from a Resources folder within an Editor folder. These Assets can only be loaded via Editor scripts, and are stripped from builds.

注意 スクリプトが Editor フォルダーにあるとき、Unity は MonoBehaviour から派生したコンポーネントをゲームオブジェクトに割り当てることはできません。

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.

You can only have one Editor Default Resources folder and it must be placed in the root of the Project; directly within the Assets folder. Place the needed Asset files in this Editor Default Resources folder or a subfolder within it. Always include the subfolder path in the path passed to the EditorGUIUtility.Load function if your Asset files are in subfolders.

Gizmos

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.

You can only have one Gizmos folder and it must be placed in the root of the Project; directly within the Assets folder. Place the needed Asset files in this Gizmos folder or a subfolder within it. Always include the subfolder path in the path passed to the Gizmos.DrawIcon function if your Asset files are in subfolders.

Plug-ins

You can add plug-ins to your Project to extend Unity’s features. Plug-ins are native DLLs that are typically written in C/C++. They can access third-party code libraries, system calls and other Unity built-in functionality. Always place plug-ins in a folder called Plugins for them to be detected by Unity.

You can only have one Plugins folder and it must be placed in the root of the Project; directly within the Assets folder.

See Special folders and script compilation order for more information on how this folder affects script compilation, and Plugin Inspector for more information on managing plug-ins for different target platforms.

Resources

You can load Assets on-demand from a script instead of creating instances of Assets in a Scene for use in gameplay. You do this by placing the Assets in a folder called Resources. Load these Assets by using the Resources.Load function.

You can have multiple Resources folders placed anywhere inside the Assets folder. Place the needed Asset files in a Resources folder or a subfolder within it. Always include the subfolder path in the path passed to the Resources.Load function if your Asset files are in subfolders.

Note that if the Resources folder is an Editor subfolder, the Assets in it are loadable from Editor scripts but are stripped from builds.

Standard Assets

標準のアセットパッケージをインポート (menu: Assets > Import Package) すると、アセットが Standard Assets フォルダーに入ります。このフォルダーはアセットを保管するだけでなく、スクリプトのコンパイル順に影響を与えます。詳しくは 特殊フォルダーとスクリプトコンパイル順を参照してください。

You can only have one Standard Assets folder and it must be placed in the root of the Project; directly within the Assets folder. Place the needed Assets files in this Standard Assets folder or a subfolder within it.

StreamingAssets

You may want the Asset to be available as a separate file in its original format although it is more common to directly incorporate Assets into a build. For example, you need to access a video file from the filesystem rather than use it as a MovieTexture to play that video on iOS. Place a file in a folder called StreamingAssets, so 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.

You can only have one StreamingAssets folder and it must be placed in the root of the Project; directly within the Assets folder. Place the needed Assets files in this StreamingAssets folder or a subfolder within it. Always include the subfolder path in the path used to reference the streaming asset if your Asset files are in subfolders.

非表示になるアセット

Assets フォルダー配下にある一部のファイルやフォルダーは、アセットのインポート時に無視されるものがあります。

  • 非表示フォルダー
  • 名前が ‘.’ から始まるファイルとフォルダー
  • 名前が ‘~’ で終わるファイルとフォルダー
  • 名前が cvs のファイルとフォルダー
  • 拡張子が .tmp のファイル

これは、OSや他のアプリケーションで作成される特別なファイルや temp ファイルのインポートを防ぐために使用できます。

Unity での IME
パッケージの出力