文档

Unity Engine


User Manual

Script Reference

Unity Engine


Control behavior with events

Map user interactions to elements, such as input, touch and pointer interactions, drag-and-drop operations, and other event types. This system includes a dispatcher, a handler, a synthesizer, and a library of event types.
阅读时间1 分钟最后更新于 1 个月前

UI Toolkit provides events that communicate user actions or notifications to visual elements. The UI Toolkit event system shares the same terminology and event naming as HTML events.

Topic

Description

Dispatch eventsUnderstand the event dispatch behavior, propagation, and target.
Capture the pointer with a manipulatorCapture the pointer to ensure an element receives all subsequent pointer events.
Handle event callbacks and value changesLearn how to handle event callbacks and value changes.
Focus order of elementsUnderstand the focus order of elements.
Respond to events with custom controlsLearn how to respond to events with custom controls.
ManipulatorsUse manipulators to handle events.
Synthesize and send eventsLearn how to synthesize and send events from an example.
Event referenceUnderstand behavior and characteristics of each event.
Event examplesExamples for UI Toolkit events.

Additional resources