Struct Pointer
Pointer generalizes the mouse pointer and the touch.
Namespace: Unity.Tiny.Input
Syntax
public struct Pointer
Fields
delta
Specifies the difference, in pixels, between the pointer position in the current frame and the previous frame. This tells you how far the pointer point has moved in the browser or application window. Positive values indicate upward/right movement, and negative values downward/left movement.
Declaration
public float2 delta
Field Value
Type | Description |
---|---|
float2 |
down
A bit mask that specifies which of the pointer buttons is down.
Declaration
public uint down
Field Value
Type | Description |
---|---|
System.UInt32 |
ended
Specifies that the pointer is expired. Expired pointers are reported in ended state for one frame, before being cleared from the list of registered pointers.
Declaration
public bool ended
Field Value
Type | Description |
---|---|
System.Boolean |
id
The unique id of the pointer. Use it with the Input.getPointerById() method.
Declaration
public int id
Field Value
Type | Description |
---|---|
System.Int32 |
internalId
Id of the pointer for the internal use (0 for the mouse and finger id for the touches).
Declaration
public int internalId
Field Value
Type | Description |
---|---|
System.Int32 |
justDown
A bit mask that specifies which of the pointer buttons was pressed in the current frame.
Declaration
public uint justDown
Field Value
Type | Description |
---|---|
System.UInt32 |
justUp
A bit mask that specifies which of the pointer buttons was released in the current frame.
Declaration
public uint justUp
Field Value
Type | Description |
---|---|
System.UInt32 |
moved
Specifies that the pointer position changed between the previous frame and this frame.
Declaration
public bool moved
Field Value
Type | Description |
---|---|
System.Boolean |
position
Specifies the absolute position of the pointer, in pixels on the browser or application window. A value of 0 corresponds to the leftmost edge of the window. The higher the value, the farther right the coordinate.
Declaration
public float2 position
Field Value
Type | Description |
---|---|
float2 |
type
The type of the pointer.
Declaration
public PointerType type
Field Value
Type | Description |
---|---|
PointerType |