docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CanvasPortEvent

    What a CanvasNode reports when a pointer interacts with one of its ports.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public readonly struct CanvasPortEvent

    Constructors

    CanvasPortEvent(CanvasNode, CanvasPort, CanvasPortSide, int, Vector2)

    Constructs a port event.

    Declaration
    public CanvasPortEvent(CanvasNode node, CanvasPort port, CanvasPortSide side, int index, Vector2 position)
    Parameters
    Type Name Description
    CanvasNode node

    The node the port belongs to.

    CanvasPort port

    The port under the pointer.

    CanvasPortSide side

    Which edge the port sits on.

    int index

    The port's index within its side.

    Vector2 position

    The pointer's position, in panel coordinates.

    Properties

    index

    The port's index within its side.

    Declaration
    public int index { get; }
    Property Value
    Type Description
    int

    node

    The node the port belongs to.

    Declaration
    public CanvasNode node { get; }
    Property Value
    Type Description
    CanvasNode

    port

    The port under the pointer.

    Declaration
    public CanvasPort port { get; }
    Property Value
    Type Description
    CanvasPort

    position

    The pointer's position, in panel coordinates.

    Declaration
    public Vector2 position { get; }
    Property Value
    Type Description
    Vector2

    side

    Which edge the port sits on.

    Declaration
    public CanvasPortSide side { get; }
    Property Value
    Type Description
    CanvasPortSide
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)