BuildProfileSettingsProvider
Provides the display information for a custom settings foldout in the Build Profile window.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Class
- Namespace: UnityEditor.Build.Profile
- Assembly: UnityEditor.BuildProfileModule
public class BuildProfileSettingsProvider
Remarks
Use this class with BuildProfileSettingsProviderAttribute to register a custom settings foldout in the Build Profile window. Additional Resources: BuildProfileSettingsProviderAttribute.
Examples
using UnityEngine;using UnityEditor.Build.Profile;class SampleSettings : ScriptableObject{ public bool myBoolSetting; [BuildProfileSettingsProvider(typeof(SampleSettings))] static BuildProfileSettingsProvider createProvider() => new BuildProfileSettingsProvider("MySampleSettings") { tooltip = "Sample settings provider for a ScriptableObject.", canAddSetting = profile => true };}
Constructors
Constructor | Description |
|---|---|
| BuildProfileSettingsProvider(System.String) | Initializes a new instance of BuildProfileSettingsProvider with the specified display name. |
Properties
Property | Description |
|---|---|
| canAddSetting | Callback that determines if the settings object this provider describes can be added to the given build profile. Must be set for settings to appear in the Build Profile window; when not set, the settings will not be shown. |
| displayName | Display name for the settings foldout in the Build Profile window. |
| hasCustomEditor | When the value is true, Unity uses a custom implementation of an Editor. Otherwise, Unity displays the default inspector for the settings object. |
| isStandaloneAsset | When the value is true, the build profile references the settings object as a standalone asset in your project instead of storing it inside the build profile. |
| onAddSetting | Optional callback that supplies the settings object when the settings are first added to a build profile. |
| tooltip | Tooltip text for the settings foldout. If this value is empty, no tooltip is displayed. |