You can usually choose any name you like for the folders you create to organize your Unity project. However, there are folder names that Unity reserves for special purposes. For example, you must place Editor scripts in a folder called Editor for them to work correctly.
このページには Unity で使われる特殊なフォルダー名の完全なリストを掲載しています。
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 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 scripts add functionality to Unity during development but aren’t available in builds at runtime. Scripts in an Editor folder run as Editor scripts, not runtime scripts.
複数の Editor フォルダーを Assets フォルダー内の任意の場所に配置できます。エディター用のスクリプトは Editor フォルダー、またはその中のサブフォルダーに配置します。
Editor フォルダーの正確な場所は、他のスクリプトと比較して、そのスクリプトがコンパイルされる時間に影響します (詳細については、特殊フォルダとスクリプトのコンパイル順 を参照してください)。
Use the EditorGUIUtility.Load function in Editor scripts to load Assets from a Resources folder within an Editor folder. These Assets are only loaded through Editor scripts and are stripped from builds.
ノート: スクリプトが Editor フォルダーにあるとき、Unity は MonoBehaviour から派生したコンポーネントをゲームオブジェクトに割り当てることはできません。
エディタースクリプトは、EditorGUIUtility.Load 関数を使用して要求に応じて読み込まれるアセットファイルを使用します。この関数は、Editor Default Resources と呼ばれるフォルダー内のアセットファイルを検索します。
You can only have one Editor Default Resources folder and you must place it in Project root, 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.DrawIcon 関数は、アイコンをシーンに配置し、特別なオブジェクトまたは位置のマーカーとして利用します。このアイコンを描画するために使用する画像ファイルを Gizmos というフォルダーに配置して、DrawIcon 関数によってそのアイコンを配置する必要があります。
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.
ゲームで使用するために、シーンのアセットのインスタンスを作成する代わりに、スクリプトから必要に応じてアセットを読み込むことができます。これを行うには、アセットを Resources というフォルダーに配置します。Resources.Load 関数を使用してこれらのアセットを読み込みます。
Assets フォルダー内の任意の場所に複数の Resources フォルダーを配置できます。必要なアセットファイルを Resources フォルダーか、その中のサブフォルダーに配置します。アセットファイルがサブフォルダーにある場合は、Resources.Load 関数に渡されるパスに常にサブフォルダーパスを含有させます。
Note: If the Resources folder is an Editor subfolder, the Assets in it are loadable from Editor scripts but are removed from builds.
When you import a Standard Asset package, Unity puts the assets in a folder called Standard Assets
. In addition to containing the assets, these folders have an effect on script compilation order. For more information, see the page on Special Folders and Script Compilation Order.
You can only have one Standard Assets
folder, and you must leave it in the root of the project, directly within the Assets
folder. Place the asset files you need inside the <project-root>/Assets/Standard Assets
folder or one of its subfolders.
You may want the Asset to be available as a separate file in its original format (though it’s more common to directly incorporate Assets into a build). For example, you need to access a video file from the filesystem to play the video on IOS using Handheld.PlayFullScreenMovie.
ストリーミングアセットを加えるには、以下を行います。
詳しくは、ストリーミングアセット のページを参照してください。
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 Assets files in the StreamingAssets folder or subfolder. Always include the subfolder path in the path used to reference the streaming asset if your Asset files are in subfolders.
Unity interprets any folder that ends with .androidpack
as an Android asset packs. For more information, see Create a custom asset pack.
Unity interprets any folder that ends with .androidlib
as an Android Library Project. For more information, see Import and Android Library Project.
インポート時に、Assets フォルダー (またはその中のサブフォルダー) 内の以下のファイルやフォルダーは、無視されます。
これは、OS や他のアプリケーションによって作成される特別なファイルや一時ファイルのインポートを防ぐためです。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.