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

EventCallbackGroup

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 elements of a any type to rapidly register multiple event callbacks.

The same callback group can be registered on multiple different elements, resulting in effective memory sharing. Note that individual callbacks that are also part of a registered group should not be unregistered separately from the rest of their group.

Additional resources: EventCallbackDefinition

Constructors

Constructor Description
EventCallbackGroup Creates a callback group allowing the provided callbacks to be registered and unregistered all at once on any VisualElement.

Public Methods

Method Description
Register Adds all group event handlers to the given element.
Unregister Removes all group event handlers from the given element.