docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AdditionalPropertiesState<TState, TTarget>

    Used in editor drawer part to store the state of additional properties areas.

    Inheritance
    object
    AdditionalPropertiesStateBase<TState>
    AdditionalPropertiesState<TState, TTarget>
    AdditionalPropertiesStateList<TTarget>
    Inherited Members
    AdditionalPropertiesStateBase<TState>.this[TState]
    AdditionalPropertiesStateBase<TState>.SetAdditionalPropertiesState(TState, bool)
    AdditionalPropertiesStateBase<TState>.ResetAnimation(TState)
    AdditionalPropertiesStateBase<TState>.RegisterEditor(Editor)
    AdditionalPropertiesStateBase<TState>.UnregisterEditor(Editor)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    Syntax
    public class AdditionalPropertiesState<TState, TTarget> : AdditionalPropertiesStateBase<TState> where TState : struct, IConvertible
    Type Parameters
    Name Description
    TState

    An enum to use to describe the state.

    TTarget

    A type given to automatically compute the key.

    Constructors

    AdditionalPropertiesState(TState, string, string)

    Constructor will create the key to store in the EditorPref the state given generic type passed.

    Declaration
    public AdditionalPropertiesState(TState defaultValue, string prefix = "CoreRP", string stateId = "UI_AP_State")
    Parameters
    Type Name Description
    TState defaultValue

    If key did not exist, it will be created with this value for initialization.

    string prefix

    [Optional] Prefix scope of the key (Default is CoreRP)

    string stateId

    [Optional] Postfix used to differentiate between different keys (Default is UI_AP_State)

    Fields

    m_State

    Stores the expanded or collapsed state of each section defined by TState.

    Declaration
    protected EditorPrefBoolFlags<TState> m_State
    Field Value
    Type Description
    EditorPrefBoolFlags<TState>

    Methods

    GetAdditionalPropertiesState(TState)

    Accessor to the expended state of this specific mask.

    Declaration
    public override bool GetAdditionalPropertiesState(TState _)
    Parameters
    Type Name Description
    TState _
    Returns
    Type Description
    bool

    True: All flagged area are expended

    Overrides
    AdditionalPropertiesStateBase<TState>.GetAdditionalPropertiesState(TState)

    HideAll()

    Utility to set all states to false

    Declaration
    public override void HideAll()
    Overrides
    AdditionalPropertiesStateBase<TState>.HideAll()

    SetAdditionalPropertiesStateValue(TState, bool)

    Setter to the expended state without resetting animation.

    Declaration
    protected override void SetAdditionalPropertiesStateValue(TState _, bool value)
    Parameters
    Type Name Description
    TState _
    bool value

    True to show the additional properties.

    Overrides
    AdditionalPropertiesStateBase<TState>.SetAdditionalPropertiesStateValue(TState, bool)

    ShowAll()

    Utility to set all states to true

    Declaration
    public override void ShowAll()
    Overrides
    AdditionalPropertiesStateBase<TState>.ShowAll()

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)