Version: 2022.3
Language : English
Drag-and-drop events
Focus events

Layout events

GeometryChangedEvent is currently the only layout event.

The base class for GeometryChangedEvent is the EventBase class.

Event Description Trickles down Bubbles up Cancellable
GeometryChangedEvent Sent when the position or the dimensions of an element changes.

Unique properties

oldRect: The former position and dimensions of the element.

newRect: The new position and dimensions of the element.

GeometryChangedEvent

The GeometryChangedEvent is sent when either the position or the dimensions of an element changes. Events of this type are only sent to the event target.

It’s important to unregister from the GeometryChangedEvent event after you receive your callback, as additional layout changes will trigger the callback again.

target: The element with a new geometry.

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