Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

EventCallbackDefinition

struct in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

An object that can be registered on VisualElements to react to any event type.

The same callback instance can be registered on multiple different elements, resulting in effective memory sharing. If the element instance is needed by the callback code, an optional argument can be used to provide it.

Additional resources: EventCallback, EventCallbackDefinition<T0>, EventCallbackGroup

Public Methods

Method Description
Register Adds this callback's event handler to the given element.
Unregister Removes this callback from the given element.