Version: 2023.1
Synthesize and send events
捕获事件

事件参考

UI Toolkit raises an event when a user interacts with and changes the state of elements from UI Toolkit. The event design is similar to the Event interface for HTML elements.

Event types fit into a hierarchy based on the EventBase class. Each event family implements an interface that defines the common characteristics of all events of the same family. For example, BlurEvent and FocusEvent use the FocusEventBase class.

选择下面列出的任何事件类型,以获取有关事件、其父类和 API 文档链接的更多信息。

Topic 描述
Capture events Events that capture the user’s interaction with the UI.
Change events Events that occur when the user changes the state of an element.
Click events Events that occur when the user clicks an element.
Command events Events that occur when the user invokes a command.
Drag and drop events Events that occur when the user drags and drops an element.
Layout events Events that occur when the layout engine changes the layout of an element.
Focus events Events that occur when the user focuses on an element.
Input events Events that occur when the user inputs text.
Keyboard events Events that occur when the user presses a key.
Mouse events Events that occur when the user moves the mouse.
Navigation events Events that occur when the user navigates through the UI.
Panel events Events that occur when the user interacts with a panel.
Pointer events Events that occur when the user interacts with a pointer device.
Tooltip events Events that occur when the user interacts with a tooltip.
Transition events Events that occur when the user interacts with a transition.
ContextualMenu events Events that occur when the user interacts with a contextual menu.
IMGUI events Events that occur when the user interacts with an IMGUI element.

其他资源

Synthesize and send events
捕获事件
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961