docs.unity.cn
    Show / Hide Table of Contents

    Class FilterWindow.GroupElement

    A meta element used to group several elements in the list or tree.

    Inheritance
    Object
    FilterWindow.Element
    FilterWindow.GroupElement
    Inherited Members
    FilterWindow.Element.level
    FilterWindow.Element.content
    FilterWindow.Element.name
    FilterWindow.Element.CompareTo(Object)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Rendering
    Syntax
    [Serializable]
    public class GroupElement : FilterWindow.Element, IComparable

    Constructors

    GroupElement(Int32, String)

    Creates a new FilterWindow.GroupElement

    Declaration
    public GroupElement(int level, string name)
    Parameters
    Type Name Description
    Int32 level

    The group level.

    String name

    The display name for the group.

    Fields

    scroll

    The current scroll position in the UI.

    Declaration
    public Vector2 scroll
    Field Value
    Type Description
    Vector2

    selectedIndex

    The current selected index in the group.

    Declaration
    public int selectedIndex
    Field Value
    Type Description
    Int32

    Properties

    ShouldDisable

    Returns true if this group and its content should appear disabled in the UI.

    Declaration
    public virtual bool ShouldDisable { get; }
    Property Value
    Type Description
    Boolean

    WantsFocus

    Requests focus for the element.

    Declaration
    public bool WantsFocus { get; protected set; }
    Property Value
    Type Description
    Boolean

    Methods

    HandleKeyboard(Event, FilterWindow, Action)

    Handles custom keyboard events on this group.

    Declaration
    public virtual bool HandleKeyboard(Event evt, FilterWindow window, Action goToParent)
    Parameters
    Type Name Description
    Event evt

    The event.

    FilterWindow window

    A reference to the parent FilterWindow.

    Action goToParent

    The action to execute if a "back" action is triggered in the UI.

    Returns
    Type Description
    Boolean

    true if the builtin events should execute for this group, false otherwise.

    OnGUI(FilterWindow)

    A custom drawing method for this group.

    Declaration
    public virtual bool OnGUI(FilterWindow sFilterWindow)
    Parameters
    Type Name Description
    FilterWindow sFilterWindow

    A reference to the parent FilterWindow.

    Returns
    Type Description
    Boolean

    true if the builtin drawing function should execute for this group, false otherwise.

    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)

    See Also

    FilterWindow.Element
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 21 July 2023