手册
脚本 API
unity3d.com
Version:
2018.4
2022.1
2021.3
2021.2
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.6
手册
脚本 API
语言:
中文
English
中文
日本語
Español
한국어
Русский
脚本 API
Version:
2018.4
2022.1
2021.3
2021.2
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.6
Experimental
: this API is experimental and might be changed or removed in the future.
CallbackEventHandler
.RegisterCallback
切换到手册
public void
RegisterCallback
(EventCallback<TEventType>
callback
,
Experimental.UIElements.TrickleDown
useTrickleDown
);
public void
RegisterCallback
(EventCallback<TEventType,TUserArgsType>
callback
, TUserArgsType
userArgs
,
Experimental.UIElements.TrickleDown
useTrickleDown
);
参数
callback
要添加的事件处理程序。
useTrickleDown
默认情况下,在 BubbleUp 阶段调用此回调。在 TrickleDown 阶段,传递 TrickleDown.TrickleDown 来调用此回调。
userArgs
要传递给回调的数据。
描述
向实例添加事件处理程序。如果已为同一阶段(TrickleDown 或 BubbleUp)注册了事件处理程序,则此方法没有效果。