docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RegisterUpdateCallbackExtensions

    Extensions to register a VisualElement update callback. This callback will be invoked when App UI main loop is updating. At runtime, the callback will be invoked once per frame. In the Editor, the callback will be invoked once per Editor update.

    Inheritance
    object
    RegisterUpdateCallbackExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public static class RegisterUpdateCallbackExtensions

    Methods

    RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)

    Register a callback which will be invoked when App UI main loop is updating. At runtime, the callback will be invoked once per frame. In the Editor, the callback will be invoked once per Editor update.

    Declaration
    [Preserve]
    public static bool RegisterUpdateCallback(this VisualElement control, EventCallback<UpdateEvent> callback)
    Parameters
    Type Name Description
    VisualElement control

    The UI component.

    EventCallback<UpdateEvent> callback

    The callback.

    Returns
    Type Description
    bool

    True if the UI component can handle callbacks, False otherwise.

    UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)

    Unregister a callback which has been invoked when App UI main loop is updating. At runtime, the callback will be invoked once per frame. In the Editor, the callback will be invoked once per Editor update.

    Declaration
    [Preserve]
    public static bool UnregisterUpdateCallback(this VisualElement control, EventCallback<UpdateEvent> callback)
    Parameters
    Type Name Description
    VisualElement control

    The UI component.

    EventCallback<UpdateEvent> callback

    The callback.

    Returns
    Type Description
    bool

    True if the UI component can handle callbacks, False otherwise.

    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)