docs.unity3d.com
    Show / Hide Table of Contents

    Class GUIHelper

    Utility functions to assist with GUIs.

    Inheritance
    Object
    GUIHelper
    Namespace: Unity.VisualScripting.ReorderableList.Internal
    Syntax
    public static class GUIHelper

    Fields

    FocusTextInControl

    Focus control and text editor where applicable.

    Declaration
    public static Action<string> FocusTextInControl
    Field Value
    Type Description
    Action<String>

    VisibleRect

    Gets visible rectangle within GUI.

    Declaration
    public static Func<Rect> VisibleRect
    Field Value
    Type Description
    Func<Rect>
    Remarks

    VisibleRect = TopmostRect + scrollViewOffsets

    Methods

    DrawTexture(Rect, Texture2D)

    Draw texture using GUIStyle to workaround bug in Unity where DrawTexture flickers when embedded inside a property drawer.

    Declaration
    public static void DrawTexture(Rect position, Texture2D texture)
    Parameters
    Type Name Description
    Rect position

    Position of which to draw texture in space of GUI.

    Texture2D texture

    Texture.

    IconButton(Rect, Boolean, Texture2D, Texture2D, GUIStyle)

    Declaration
    public static bool IconButton(Rect position, bool visible, Texture2D iconNormal, Texture2D iconActive, GUIStyle style)
    Parameters
    Type Name Description
    Rect position
    Boolean visible
    Texture2D iconNormal
    Texture2D iconActive
    GUIStyle style
    Returns
    Type Description
    Boolean

    IconButton(Rect, Texture2D, Texture2D, GUIStyle)

    Declaration
    public static bool IconButton(Rect position, Texture2D iconNormal, Texture2D iconActive, GUIStyle style)
    Parameters
    Type Name Description
    Rect position
    Texture2D iconNormal
    Texture2D iconActive
    GUIStyle style
    Returns
    Type Description
    Boolean

    Separator(Rect)

    Declaration
    public static void Separator(Rect position)
    Parameters
    Type Name Description
    Rect position

    Separator(Rect, Color)

    Declaration
    public static void Separator(Rect position, Color color)
    Parameters
    Type Name Description
    Rect position
    Color color
    Back to top
    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