docs.unity3d.com
    Show / Hide Table of Contents

    Class GeometryChangedEvent

    This event is sent after layout calculations, when the position or the dimension of an element changes.

    Inheritance
    Object
    EventBase
    EventBase<GeometryChangedEvent>
    GeometryChangedEvent
    Inherited Members
    EventBase<GeometryChangedEvent>.TypeId()
    EventBase<GeometryChangedEvent>.GetPooled()
    EventBase<GeometryChangedEvent>.Dispose()
    EventBase<GeometryChangedEvent>.eventTypeId
    EventBase.RegisterEventType()
    EventBase.timestamp
    EventBase.PreDispatch()
    EventBase.PreDispatch(IPanel)
    EventBase.PostDispatch()
    EventBase.PostDispatch(IPanel)
    EventBase.bubbles
    EventBase.tricklesDown
    EventBase.target
    EventBase.isPropagationStopped
    EventBase.StopPropagation()
    EventBase.isImmediatePropagationStopped
    EventBase.StopImmediatePropagation()
    EventBase.isDefaultPrevented
    EventBase.PreventDefault()
    EventBase.propagationPhase
    EventBase.currentTarget
    EventBase.dispatch
    EventBase.imguiEvent
    EventBase.originalMousePosition
    EventBase.pooled
    Namespace: UnityEngine.UIElements
    Syntax
    public class GeometryChangedEvent : EventBase<GeometryChangedEvent>
    Remarks

    This event does not trickle down or bubble up. It cannot be cancelled.

    Constructors

    GeometryChangedEvent()

    Constructor.

    Declaration
    public GeometryChangedEvent()

    Properties

    newRect

    Gets the elements's new dimensions.

    Declaration
    public Rect newRect { get; }
    Property Value
    Type Description
    Rect

    oldRect

    Gets the element's old dimensions.

    Declaration
    public Rect oldRect { get; }
    Property Value
    Type Description
    Rect

    Methods

    GetPooled(Rect, Rect)

    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.

    Declaration
    public static GeometryChangedEvent GetPooled(Rect oldRect, Rect newRect)
    Parameters
    Type Name Description
    Rect oldRect

    The old dimensions of the element.

    Rect newRect

    The new dimensions of the element.

    Returns
    Type Description
    GeometryChangedEvent

    An initialized event.

    Init()

    Resets the event values to their initial values.

    Declaration
    protected override void Init()
    Overrides
    UnityEngine.UIElements.EventBase<UnityEngine.UIElements.GeometryChangedEvent>.Init()
    In This Article
    • Constructors
      • GeometryChangedEvent()
    • Properties
      • newRect
      • oldRect
    • Methods
      • GetPooled(Rect, Rect)
      • Init()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023