Provides the display information for a custom settings foldout in the Build Profile window.
Use this class with BuildProfileSettingsProviderAttribute to register a custom settings foldout in the Build Profile window. Additional resources: BuildProfileSettingsProviderAttribute.
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 }; }
| 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. |
| tooltip | Tooltip text for the settings foldout. If this value is empty, no tooltip is displayed. |
| Constructor | Description |
|---|---|
| BuildProfileSettingsProvider | Initializes a new instance of BuildProfileSettingsProvider with the specified display name. |