if (m_Subsystem != null) m_Subsystem.updatedHands += OnHandUpdate; }
voidOnHandUpdate(XRHandSubsystem subsystem, XRHandSubsystem.UpdateSuccessFlags updateSuccessFlags, XRHandSubsystem.UpdateType updateType) { switch (updateType) { case XRHandSubsystem.UpdateType.Dynamic: // Update game logic that uses hand data break; case XRHandSubsystem.UpdateType.BeforeRender: for (var i = XRHandJointID.BeginMarker.ToIndex(); i < XRHandJointID.EndMarker.ToIndex(); i++) { var trackingData = subsystem.rightHand .GetJoint(XRHandJointIDUtility.FromIndex(i));
if (trackingData.TryGetPose(out Pose pose)) { // displayTransform is some GameObject's Transform component Debug.Log($"[{nameof(XRHand)}]Joint{i} : {nameof(Position)}{pose.position} | {nameof(Rotate)}{pose.rotation}"); } } break; } }
General settings container used to house the instance of the active settings as well as the manager instance used to load the loaders with.
XR Loader abstract class used as a base class for specific provider implementations. Providers should implement subclasses of this to provide specific initialization and management implementations that make sense for their supported scenarios and needs.