Class UnityJoystickManager
Manages joysticks using unity input system.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input.UnityInput
Assembly: cs.temp.dll.dll
Syntax
[MixedRealityDataProvider(typeof(IMixedRealityInputSystem), null, "Unity Joystick Manager")]
public class UnityJoystickManager : BaseInputDeviceManager, IMixedRealityServiceState, IMixedRealityInputDeviceManager, IMixedRealityDataProvider, IMixedRealityService, IDisposable
Constructors
UnityJoystickManager(IMixedRealityServiceRegistrar, IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
[Obsolete("This constructor is obsolete (registrar parameter is no longer required) and will be removed in a future version of the Microsoft Mixed Reality Toolkit.")]
public UnityJoystickManager(IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the data provider. |
IMixedRealityInputSystem | inputSystem | The IMixedRealityInputSystem instance that receives data from this provider. |
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
UnityJoystickManager(IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
public UnityJoystickManager(IMixedRealityInputSystem inputSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityInputSystem | inputSystem | The IMixedRealityInputSystem instance that receives data from this provider. |
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
Fields
ActiveControllers
Declaration
protected static readonly Dictionary<string, GenericJoystickController> ActiveControllers
Field Value
Type | Description |
---|---|
Dictionary<String, GenericJoystickController> |
Methods
Disable()
Optional Disable function to pause the service.
Declaration
public override void Disable()
Overrides
GetActiveControllers()
Retrieve all controllers currently registered with this device at runtime (if direct access is required)
Declaration
public override IMixedRealityController[] GetActiveControllers()
Returns
Type | Description |
---|---|
IMixedRealityController[] |
Overrides
GetCurrentControllerType(String)
Gets the current controller type for the joystick name provided.
Declaration
protected virtual SupportedControllerType GetCurrentControllerType(string joystickName)
Parameters
Type | Name | Description |
---|---|---|
String | joystickName | The name of the joystick from Unity's Input.GetJoystickNames |
Returns
Type | Description |
---|---|
SupportedControllerType | The supported controller type |
GetOrAddController(String)
Gets or adds a controller using the joystick name provided.
Declaration
protected virtual GenericJoystickController GetOrAddController(string joystickName)
Parameters
Type | Name | Description |
---|---|---|
String | joystickName | The name of the joystick from Unity's Input.GetJoystickNames |
Returns
Type | Description |
---|---|
GenericJoystickController | A new controller reference. |
RemoveController(String)
Removes a controller using the joystick name provided.
Declaration
protected virtual void RemoveController(string joystickName)
Parameters
Type | Name | Description |
---|---|---|
String | joystickName | The name of the joystick from Unity's Input.GetJoystickNames |
Update()
Optional Update function to perform per-frame updates of the service.
Declaration
public override void Update()