Version: 2018.2
Preferences
Build Settings ウィンドウ

プリセット

Preset (プリセット) を使用すると、複数のコンポーネントとアセット間でプロパティー設定を再利用できます。

With Presets you can also specify default settings for new components and the import settings for assets. Use the Preset Manager to view and choose the Presets to use for default settings.

Use Presets to streamline your team’s workflows. You can even use Presets to specify settings for Settings Managers, including the Preset Manager itself. Use this feature to configure a project then export it as a custom package. Your team members can import this package into their projects.

プリセットはエディターのみの機能です。Unity エディターの拡張機能で プリセットをサポートすることができます。Unity Player でランタイムにプリセットを使用することはできません。

プロパティー設定の再利用

プリセットはコピーや貼り付けなどのように使用します。ただし、クリップボードに設定をコピーするのではなく、後で使用するために保存します。貼り付け設定と同様に、プリセットを任意の項目に適用すると、項目のプロパティーが変更されます。

例えば、ゲームオブジェクトを選択し、RigidBody コンポーネントのプロパティーを編集します。これらの設定をプリセットに保存します。次に、他のゲームオブジェクトの RigidBody コンポーネントにこのプリセットを適用します。ゲームオブジェクトの他のコンポーネントは影響を受けません。プリセットはその設定を RigidBody コンポーネントにのみ適用します。

You can store Presets in the Assets folder of your project. Use the Project window to view and select Presets to edit in the Inspector.

Project ウィンドウのプリセットアセットの例。Presets サブフォルダー内に整理されています。
Project ウィンドウのプリセットアセットの例。Presets サブフォルダー内に整理されています。

プロパティー設定をプリセットに保存

プロパティー設定を保存するには、Select Preset ウィンドウを使用します。

ヒント 再生モードのときにプリセットを保存することもできます。

設定をプリセットに保存するには、以下の手順を行います。

  1. Select the GameObject, asset import settings, or Settings Manager from which you want to reuse settings.

  2. Inspector ウィンドウでプロパティーを編集します。

  3. Inspector ウィンドウの右上にあるプリセットアイコンをクリックします。

  4. Select Preset ウィンドウで Save current to をクリックします。

    File Save ダイアログが表示されます。

  5. 新しいプリセットの保存場所を選択し、名前を入力して Save をクリックします。

プリセットの適用

保存したプリセットを Select Preset ウィンドウで適用するか、Project ウィンドウのプリセットをゲームオブジェクトにドラッグアンドドロップして適用します。

ノート プリセットを適用すると、プロパティーがプリセットからアイテムにコピーされます。しかし、プリセットとアイテムはリンクされません。プリセットを変更しても、以前そのプリセットを適用した項目には影響しません。

To apply a Preset to a Settings Manager, an existing component, or import settings for an asset:

  1. Select the Settings Manager, GameObject, or asset import settings that you want to apply a Preset to.

  2. InspectorPreset アイコンをクリックします。

  3. In the Select Preset window, search for and select the Preset to apply.

    Selecting the Preset applies it to the component, asset, or Settings Manager.

  4. Select Preset ウィンドウを閉じます。

Drag and drop a Preset from the Project window to apply properties to a component in a GameObject:

  • Drop the Preset on an empty spot in the Hierarchy window. Unity creates a new, empty GameObject and adds a component with properties copied from the Preset.

  • 既存のゲームオブジェクトのプリセットを Hierarchy にドロップします。Unity は新しいコンポーネントを加え、プリセットからプロパティーをコピーします。

  • Drop the Preset on the Inspector window at the end of a GameObject. Unity adds a new component and copies properties from the Preset.

  • Inspector のプリセットを既存のコンポーネントの名前上にドロップします。Unity はプリセットのプロパティーをコピーします。

プリセットを Animation State ノードの遷移に使用

You can save and apply Presets for Animation State nodes. However, the transitions in the Preset are shared among Presets and the nodes that you apply the Preset to. For example, you apply a Preset to two different nodes in the Animator Window. In the Inspector window, you edit the settings for one of the transitions in the first node. Your change also appears in the other node and in the Preset.

Using Presets for importing assets

You can save Presets for asset import settings. However, applying a Preset to import settings does not affect the cross-platform settings. To apply a Preset so that it includes cross-platform settings, set the Preset as a default then use the Reset command.

You can also use a script to apply a Preset to an asset based on the location of the asset in the Project window.

プリセットの編集

Use the Inspector window to edit a Preset asset.

ノート プリセットのプロパティーを変更しても、プリセットを適用した項目は更新されません。例えば、RigidBody コンポーネントのプリセットをゲームオブジェクトに適用し、次に、プリセットを編集すると、RigidBody コンポーネントの設定は変更されません。

Editing a Preset in the Inspector window
Editing a Preset in the Inspector window

2017–03–27 限られた 編集レビュー でパブリッシュされたページ

2018.1 の新機能 NewIn20181

Preferences
Build Settings ウィンドウ
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961