Struct CanvasPortEvent
What a CanvasNode reports when a pointer interacts with one of its ports.
Inherited Members
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 |