GeometryChangedEvent
This event is sent after layout calculations, when the position or the dimension of an element changes.
Read time 2 minutesLast updated 6 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: EventBase<GeometryChangedEvent>
- Implements: IDisposable
public class GeometryChangedEvent : EventBase<GeometryChangedEvent>, IDisposable
Remarks
This event does not trickle down or bubble up. It cannot be cancelled.
Constructors
Constructor | Description |
|---|---|
| GeometryChangedEvent() | Constructor. Avoid creating new event instances. Instead, use GetPooled() to get an instance from a pool of reusable event instances. |
Properties
Property | Description |
|---|---|
| newRect | Gets the elements's new dimensions. |
| oldRect | Gets the element's old dimensions. |
Methods
Method | Description |
|---|---|
| Init | Resets the event values to their initial values. |
Static Methods
Method | Description |
|---|---|
| GetPooled | Gets an event from the event pool, and initializes it with the specified values. Use this method instead of instancing new events. Use Dispose() to release events back to the event pool. |