class MAGES::DeviceManager::MAGESDeviceManager¶
Overview¶
MAGES implementation for Device Management. More…
class MAGESDeviceManager: public MAGES::DeviceManagerModule { public: // structs struct XRLoaderOffset; // properties List<XRLoaderOffset> XRLoaderOffsets; Pose LeftHandOffset; Pose RightHandOffset; InputController ControllerActions; // methods override void Startup(); override void Shutdown(); virtual override void UpdateModule(UpdatePhase updatePhase); virtual override bool IsDeviceAvailable(Device device); virtual override bool TrySendHapticImpulse( Device device, float intensity = 0.8f, float duration = 0.1f ); };
Inherited Members¶
public: // enums enum CameraMode; enum Device; // properties int Version; IDriver ActiveDriver; IDriver DriverOverride; UnityEvent<DriverChangeEventArgs> OnDriverChanged; UnityEvent<DriverEvent> OnDriverEvent; CameraMode CurrentMode; float CameraHeight; GameObject MobileNavigationUI; IInteractionActions InteractionActions; ILocomotionActions LocomotionActions; IGenericInputActions GenericActions; IMobile3DActions Mobile3DActions; GameObject CameraGameObject; GameObject CameraRig; GameObject LeftController; Transform LeftControllerOffset; GameObject RightController; Transform RightControllerOffset; Camera CameraRef; GameObject RigPrefab; // methods void Startup(); void Shutdown(); virtual void UpdateModule(UpdatePhase updatePhase); virtual bool TrySendHapticImpulse( Device device, float intensity = 0.8f, float duration = 0.1f ); virtual bool IsDeviceAvailable(Device device); virtual bool SendHapticPulse( string controllerSide, float intensity, float duration = 0.1f ); virtual bool IsXRControllerAvailable(string controllerName);
Detailed Documentation¶
MAGES implementation for Device Management.
Deprecated MAGESDeviceManager is deprecated. Please use MAGESDeviceManagerV2 instead.
Properties¶
List<XRLoaderOffset> XRLoaderOffsets
Gets or sets the offset of the controllers for different loaders.
Pose LeftHandOffset
Gets or sets the offset of the left controller.
Pose RightHandOffset
Gets or sets the offset of the right controller.
InputController ControllerActions
Gets or sets the MAGES InputController.
Methods¶
override void Startup()
Initializes the DeviceManager and InputController of MAGES.
override void Shutdown()
Shutdowns the DeviceManager and InputController of MAGES.
virtual override void UpdateModule(UpdatePhase updatePhase)
Called while the module is active.
Parameters:
updatePhase |
The phase of the update. |
virtual override bool IsDeviceAvailable(Device device)
Gets if the device is available and tracking for it is supported.
Parameters:
device |
The device. |
Returns:
true
if the device is available.
virtual override bool TrySendHapticImpulse( Device device, float intensity = 0.8f, float duration = 0.1f )
Tries to send a haptic impulse to the left controller.
If the left controller is not available, or the driver does not support haptic impulses, this method does nothing.