docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VisualElementUtility

    Provides utility functions related to VisualElement.

    Inheritance
    object
    VisualElementUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.UIElements.TestFramework
    Assembly: Unity.UI.TestFramework.Runtime.dll
    Syntax
    public static class VisualElementUtility

    Methods

    ContainsMouseCapture(VisualElement)

    Checks if this element or any of its descendants has mouse capture.

    Declaration
    public static bool ContainsMouseCapture(VisualElement currentElement)
    Parameters
    Type Name Description
    VisualElement currentElement

    VisualElement to check.

    Returns
    Type Description
    bool

    True if the element has captured the mouse; otherwise, false.

    GetMouseCaptureHandler(VisualElement)

    Gets the EventHandler for the currentElement.

    Declaration
    public static IEventHandler GetMouseCaptureHandler(VisualElement currentElement)
    Parameters
    Type Name Description
    VisualElement currentElement

    The VisualElement to get the EventHandler from.

    Returns
    Type Description
    IEventHandler

    The EventHandler for the element.

    In This Article
    Back to top
    Copyright © 2025 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)