void Update() { m_Handedness = this.GetHandedness(); }
/// <summary> /// Sets the handedness of the primary user. If the handedness changes from current will trigger events registered via <see cref="UsesDeviceHandednessMethods.SubscribeToHandednessChanged"/>. /// </summary> /// <param name="user">The functionality user.</param> /// <param name="value">The desired handedness for the primary user.</param> public static void SetHandedness(this IUsesDeviceHandedness user, XRControllerHandedness value) { user.provider.handedness = value; }
static void OnHandednessChanged(XRControllerHandedness newHandedness) { Debug.Log($"Handedness Changed to {newHandedness}"); }