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

PointableCanvas Class

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.

Fields

Canvas : Canvas
Implementation of IPointableCanvas.Canvas; for details, please refer to the related documentation provided for that interface.
Signature
Canvas Oculus.Interaction.PointableCanvas.Canvas

Protected Methods

OnDisable ()
Signature
override void Oculus.Interaction.PointableCanvas.OnDisable()
Returns
override void
OnEnable ()
Signature
override void Oculus.Interaction.PointableCanvas.OnEnable()
Returns
override void
Start ()
Signature
override void Oculus.Interaction.PointableCanvas.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 Oculus.Interaction.PointableCanvas.InjectAllPointableCanvas(Canvas canvas)
Parameters
canvas: Canvas
Returns
void
InjectCanvas ( canvas )
Sets the UnityCanvas 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 Oculus.Interaction.PointableCanvas.InjectCanvas(Canvas canvas)
Parameters
canvas: Canvas
Returns
void