docs.unity.cn
    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>.Item[TState]
    AdditionalPropertiesStateBase<TState>.SetAdditionalPropertiesState(TState, Boolean)
    AdditionalPropertiesStateBase<TState>.ResetAnimation(TState)
    AdditionalPropertiesStateBase<TState>.RegisterEditor(Editor)
    AdditionalPropertiesStateBase<TState>.UnregisterEditor(Editor)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Rendering
    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

    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 mask)
    Parameters
    Type Name Description
    TState mask

    The filtering mask

    Returns
    Type Description
    Boolean

    True: All flagged area are expended

    Overrides
    UnityEditor.Rendering.AdditionalPropertiesStateBase<TState>.GetAdditionalPropertiesState(TState)

    HideAll()

    Utility to set all states to false

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

    SetAdditionalPropertiesStateValue(TState, Boolean)

    Setter to the expended state without resetting animation.

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

    The filtering mask.

    Boolean value

    True to show the additional properties.

    Overrides
    UnityEditor.Rendering.AdditionalPropertiesStateBase<TState>.SetAdditionalPropertiesStateValue(TState, System.Boolean)

    ShowAll()

    Utility to set all states to true

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

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, Boolean)
    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 07 August 2023