Method group is Obsolete

CallbackEventHandler.HandleEvent

Obsolete The virtual method CallbackEventHandler.HandleEvent is deprecated and will be removed in a future release. Please override ExecuteDefaultAction instead.

Declaration

public void HandleEvent(UIElements.EventBase evt);

Parameters

evt The event to handle.

Description

Handles an event according to its propagation phase and current target, by executing the element's default action, default action at target, or callbacks associated with the event.

The EventDispatcher may invoke this method multiple times for the same event: once for each propagation phase and each target along the event's propagation path if it has matching callbacks or, in the case of the leaf target, if it overrides default actions for the event.

Do not use this method to intercept all events whose propagation path include this element. There is no guarantee that it will or will not be invoked for a propagation phase or target along the propagation path if that target has no callbacks for the event and has no default action override that can receive the event.

Use CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown), CallbackEventHandler.ExecuteDefaultAction, or CallbackEventHandler.ExecuteDefaultActionAtTarget for more predictable results.

See Also: CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown), CallbackEventHandler.ExecuteDefaultAction, CallbackEventHandler.ExecuteDefaultActionAtTarget


对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961