RendererLCD:
- event Action OnBeforeRendererL is called before rendering the first frame (for the left eye). It will be called if stereo mode is active.
- event Action OnBeforeRendererR is called before rendering the second frame (for the right eye). It will be called if stereo mode is active.
It is useful to subscribe to these events if you need to update the state of something for the left and right eyes. This is because these two frames will be rendered with some delay, and the state of something when rendering the first frame in the future may already be outdated for the second frame.
Example: a mirror - we render with one projection for the left eye, and with another for the right.
MonoRendererLCD:
OnBeforeRenderer is called before rendering the frame. It will be called if mono mode is active.
It is worth subscribing if you need to perform any tasks immediately before rendering the frame.
StylusCreator:
- event Action OnCreatedStylus<Stylus> is called when a new stylus GameObject is created.
- Stylus[] Styluses {get;} returns an array of active styluses.
Stylus:
- event Action<Stylus,bool> OnUpdatedButtonPhase is called with each new state update, even if the state stays the same. If the stylus is disconnected while the button is pressed, then it signals the released state.
- public event Action<Pose, Vector3,Vector3> OnUpdatedPose is called after the stylus pose is updated, has the parameters:
- Pose - the position and rotation of the stylus in world space,
- world velocity,
- angular velocity.
3.
event Action<Stylus> OnDestroying is called when the stylus GameObject is deleted.
4.
Pose ExtrapolatedPose {get;} is the last extrapolated pose received.
5.
Vector3 ExtrapolatedVelocity {get;} is the last extrapolated
world velocity value received.
6.
ExtrapolatedAngularVelocity {get;} is the last extrapolated
angular velocity value received.
An example of working with the SDK can be found
here, as well as a demonstration of the stylus operation and several options for implementing its logic.