Method GetCurrentGameObject
GetCurrentGameObject(int)
This will check the existing lists of pointer events and hand back the most current GameObject entered by the current pointer.
Declaration
public GameObject GetCurrentGameObject(int pointerId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | pointerId | ID of the XR device pointer, mouse pointer or touch registered with the UIInputModule.
Meaning this should correspond to either PointerEventData. |
Returns
| Type | Description |
|---|---|
| GameObject | The GameObject that triggered the pointerEnter event. |
Remarks
Any negative value used for pointerId will be treated as any. The first event in the
from a tracked device will be used first, then to standard pointer devices such as mice and touchscreens.