シーンテンプレートを編集するには、Project ウィンドウ でテンプレートを選択し、Inspector ウィンドウ でそれを開きます。
ノート: |
---|
空のシーンテンプレート を最初に作成する場合は、使用する前にそのプロパティを編集してシーンと関連付ける必要があります。アクティブなシーンや既存のシーンアセットから作成するテンプレートには、デフォルトでいくつかのプロパティが設定されています。 |
シーンテンプレートの Inspector
シーンテンプレートの Inspector には、以下のセクションがあります。
Details セクションでは、テンプレートに使用するシーンを指定し、New Scene Dialog でのテンプレートの表示方法を制御します。
プロパティ | 説明 | |
---|---|---|
Template Scene | テンプレートとして使用するシーンを指定します。プロジェクトのどのシーンでも指定できます。 | |
Title | テンプレート名です。ここで入力した名前は New Scene Dialog に表示されます。 | |
Description | テンプレートの説明です。ここで入力した説明は New Scene Dialog に表示されます。 | |
Pin in New Scene Dialog |
New Scene Dialog で、このテンプレートをピン留めするかどうかを制御します。 ピン留めされたテンプレートは、常に Scene Templates in Project リストの一番上に表示されます。 |
Thumbnail セクションには、テンプレートのプレビュー画像を作成するためのオプションがあります。プレビュー画像は New Scene Dialog に表示されます。
プロパティ | 説明 | |
---|---|---|
Texture | このテンプレートのサムネイルとして使用するテクスチャアセットを指定します。 テクスチャを割り当てない場合、テンプレートはデフォルトのシーンテンプレートアセットアイコンを使用します。 |
|
[Thumbnail Preview] | テンプレートのサムネイルテクスチャがある場合は、それを表示します。 | |
Snapshot | このテンプレートのサムネイル画像をキャプチャするためのオプションを提供します。 | |
View | Main Camera ビューをキャプチャするか、 Game View をキャプチャするかを指定します。 | |
Take Snapshot | このボタンをクリックすると、選択した ビュー をキャプチャすることができます。 |
これらのプロパティを使用して、このテンプレートに Scene Template Pipeline スクリプトを加えます。
Scene Template Pipeline スクリプトでは、テンプレートから新しいシーンを作成する際に、カスタムコードを実行することができます。詳しくは、新しいシーンの作成のカスタマイズ を参照してください。
このセクションでは、テンプレートシーンのすべての Dependencies を列挙しています。テンプレートから新しいシーンを作成 する際に、各依存関係を クローン するかどうかを指定できます 。
名前で依存関係を検索するには、検索バーにテキストを入力します。
Dependencies のリストをソートするには、次のように操作します。
リスト内の各依存関係について、Clone オプションをオンにして依存関係を複製するか、オフにして依存関係を参照するかを切り替えます。依存関係を複製すると、コピーが作成されます。依存関係を参照すると、オリジナルに加えられたすべての変更が依存関係に影響します。
テンプレートから新しいシーンを作成する際、Unity はテンプレートシーンに複製できる依存関係があるかどうかを確認します。そうであれば、Unity は新しいシーンと同じ名前のフォルダーを作り、複製された依存関係をそのフォルダーに入れます。
複製された依存関係と参照された依存関係の詳細は、テンプレートとシーンの依存関係 を参照してください。
Unity がデフォルトで複製するアセットの種類を指定するには、シーンテンプレート Project settings を編集します。
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.