API reference
API reference
Select your platform
No SDKs available
No versions available

PointableCanvasModule Class

Extends PointerInputModule
PointableCanvasModule is a context-like object which exists in the scene and handles routing for certain types of PointerEvents, translating them into Unity pointer events which can be routed to and consumed by Unity Canvases.
PointableCanvas requires that the scene contain a PointableCanvasModule.

Events

Global event invoked in response to a PointerEventType.Select on an IPointableCanvas.
Though this event itself is static, it is invoked by the PointableCanvasModule instance in the scene as part of Process.
Global event invoked in response to a PointerEventType.Unselect on an IPointableCanvas.
Though this event itself is static, it is invoked by the PointableCanvasModule instance in the scene as part of Process.
Global event invoked in response to a PointerEventType.Hover on an IPointableCanvas.
Though this event itself is static, it is invoked by the PointableCanvasModule instance in the scene as part of Process.
Global event invoked in response to a PointerEventType.Unhover on an IPointableCanvas.
Though this event itself is static, it is invoked by the PointableCanvasModule instance in the scene as part of Process.

Properties

If true, this module will disable other input modules in the event system and will be the only input module used in the scene.
static PointableCanvasModule Instance[Get]

Protected Fields

bool _started[Get]

Static Member Functions

Registers an IPointableCanvas with the PointableCanvasModule in the scene so that its PointerEvents can be correctly handled, converted, and forwarded.
Parameters
pointerCanvas
The IPointableCanvas to register
Unregisters an IPointableCanvas with the PointableCanvasModule in the scene.
PointerEvents from that canvas will no longer be propagated to the Unity Canvas.
Parameters
pointerCanvas
The IPointableCanvas to unregister

Protected Functions

override void Awake ( )
override void OnDestroy ( )
override void Start ( )
override void OnEnable ( )
override void OnDisable ( )
This method is based on ProcessTouchPoint in StandaloneInputModule, but is instead used for Pointer events
Override of PointerInputModule's ProcessDrag to allow using the initial press position for drag begin.
Set _useInitialPressPositionForDrag to false if you prefer the default behaviour of PointerInputModule.

Member Functions

This is an internal API which is invoked to update the PointableCanvasModule.
This overrides the UpdateModule() method of Unity's BaseInputModule, from which PointableCanvasModule is descended, and should not be invoked directly.
This is an internal API which is invoked to process input.
This overrides the Process() method of Unity's BaseInputModule, from which PointableCanvasModule is descended, and should not be invoked manually.

Object Data for protected-static-func

static RaycastResult FindFirstRaycastWithinCanvas
( List< RaycastResult > candidates,
Canvas canvas )
Used in PointerInputModule's ProcessDrag implementation.
Brought into this subclass with a protected signature (as opposed to the parent's private signature) to be used in this subclass's overridden ProcessDrag.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon