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.
Inherited Members
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. |