API reference

PointableCanvas Class

Implements IPointableCanvas
PointableCanvas allows any IPointable to forward its events onto an associated Unity Canvas via the IPointableCanvas interface.
Requires a PointableCanvasModule to be instantiated in the scene.
Forwarding PointerEvents to Unity Canvases allows conventional 2D Unity UIs to be used in VR with any PointerInteractor<TInteractor, TInteractable> (RayInteractor, PokeInteractor, etc.). The online documentation contains overviews of how to do this.

Properties

Canvas : Canvas
[Get]
Implementation of IPointableCanvas.Canvas; for details, please refer to the related documentation provided for that interface.
Signature
Canvas Canvas

Protected Methods

OnDisable ()
Signature
override void OnDisable()
Returns
override void
OnEnable ()
Signature
override void OnEnable()
Returns
override void
Start ()
Signature
override void Start()
Returns
override void

Methods

InjectAllPointableCanvas ( canvas )
Injects all required dependencies for a dynamically instantiated PointableCanvas; because only a Unity Canvas is required, this simply wraps InjectCanvas(Canvas).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectAllPointableCanvas(Canvas canvas)
Parameters
canvas: Canvas
Returns
void
InjectCanvas ( canvas )
Sets the Unity Canvas for a dynamically instantiated PointableCanvas.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectCanvas(Canvas canvas)
Parameters
canvas: Canvas
Returns
void