docs.unity.cn
    Show / Hide Table of Contents

    Class ExpandedStateBase<TState>

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

    Inheritance
    Object
    ExpandedStateBase<TState>
    ExpandedState<TState, TTarget>
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Rendering
    Syntax
    public abstract class ExpandedStateBase<TState>
        where TState : struct, IConvertible
    Type Parameters
    Name Description
    TState

    An enum to use to describe the state.

    Properties

    Item[TState]

    Get or set the state given the mask.

    Declaration
    public bool this[TState mask] { get; set; }
    Parameters
    Type Name Description
    TState mask

    The filtering mask

    Property Value
    Type Description
    Boolean

    True: All flagged area are expended

    Methods

    CollapseAll()

    Utility to set all states to false

    Declaration
    public abstract void CollapseAll()

    ExpandAll()

    Utility to set all states to true

    Declaration
    public abstract void ExpandAll()

    GetExpandedAreas(TState)

    Accessor to the expended state of this specific mask.

    Declaration
    public abstract bool GetExpandedAreas(TState mask)
    Parameters
    Type Name Description
    TState mask

    The filtering mask

    Returns
    Type Description
    Boolean

    True: All flagged area are expended

    SetExpandedAreas(TState, Boolean)

    Setter to the expended state.

    Declaration
    public abstract void SetExpandedAreas(TState mask, bool value)
    Parameters
    Type Name Description
    TState mask

    The filtering mask

    Boolean value

    The expended state to set

    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 08 September 2023