docs.unity3d.com
    Show / Hide Table of Contents

    Class ScriptableSettingsProvider<T>

    Expose a ScriptableSettings of type T as a settings provider

    Inheritance
    Object
    SettingsProvider
    ScriptableSettingsProvider<T>
    Inherited Members
    SettingsProvider.OnDeactivate()
    SettingsProvider.HasSearchInterest(String)
    SettingsProvider.OnTitleBarGUI()
    SettingsProvider.OnFooterBarGUI()
    SettingsProvider.OnInspectorUpdate()
    SettingsProvider.Repaint()
    UnityEditor.SettingsProvider.PopulateSearchKeywordsFromGUIContentProperties<T>()
    UnityEditor.SettingsProvider.GetSearchKeywordsFromGUIContentProperties<T>()
    SettingsProvider.GetSearchKeywordsFromSerializedObject(SerializedObject)
    SettingsProvider.GetSearchKeywordsFromPath(String)
    SettingsProvider.label
    SettingsProvider.settingsPath
    SettingsProvider.scope
    SettingsProvider.keywords
    SettingsProvider.guiHandler
    SettingsProvider.titleBarGuiHandler
    SettingsProvider.footerBarGuiHandler
    SettingsProvider.activateHandler
    SettingsProvider.deactivateHandler
    SettingsProvider.hasSearchInterestHandler
    SettingsProvider.inspectorUpdateHandler
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils.Editor
    Syntax
    public abstract class ScriptableSettingsProvider<T> : SettingsProvider where T : ScriptableSettingsBase<T>
    Type Parameters
    Name Description
    T

    The ScriptableSettings type which will be exposed

    Constructors

    ScriptableSettingsProvider(String, SettingsScope)

    Initialize a new ScriptableSettingsProvider

    Declaration
    protected ScriptableSettingsProvider(string path, SettingsScope scope = SettingsScope.User)
    Parameters
    Type Name Description
    String path

    The path to this settings view within the Preferences or Project Settings window

    SettingsScope scope

    The scope of these settings

    Properties

    SerializedObject

    A SerializedObject representing the ScriptableSettings being provided

    Declaration
    protected SerializedObject SerializedObject { get; }
    Property Value
    Type Description
    SerializedObject

    Target

    The ScriptableSettings being provided

    Declaration
    protected T Target { get; }
    Property Value
    Type Description
    T

    Methods

    OnActivate(String, VisualElement)

    Use this function to implement a handler for when the user clicks on the Settings in the Settings window. You can fetch a settings Asset or set up UIElements UI from this function.

    Declaration
    public abstract override void OnActivate(string searchContext, VisualElement rootElement)
    Parameters
    Type Name Description
    String searchContext

    Search context in the search box on the Settings window.

    VisualElement rootElement

    Root of the UIElements tree. If you add to this root, the SettingsProvider uses UIElements instead of calling SettingsProvider.OnGUI to build the UI. If you do not add to this VisualElement, then you must use the IMGUI to build the UI.

    Overrides
    SettingsProvider.OnActivate(String, VisualElement)

    OnGUI(String)

    Use this function to draw the UI based on IMGUI. This assumes you haven't added any children to the rootElement passed to the OnActivate function.

    Declaration
    public abstract override void OnGUI(string searchContext)
    Parameters
    Type Name Description
    String searchContext

    Search context for the Settings window. Used to show or hide relevant properties.

    Overrides
    SettingsProvider.OnGUI(String)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023