Skip to content

Commit 5a9cab2

Browse files
renamed GenericUnityController to GenericJoystickController
renamed UnityDeviceManager to UnityJoystickManager
1 parent d56eb4d commit 5a9cab2

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

Assets/MixedRealityToolkit/_Core/Devices/OpenVR/GenericOpenVRController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace Microsoft.MixedReality.Toolkit.Core.Devices.OpenVR
1414
{
15-
public class GenericOpenVRController : GenericUnityController
15+
public class GenericOpenVRController : GenericJoystickController
1616
{
1717
public GenericOpenVRController(TrackingState trackingState, Handedness controllerHandedness, IMixedRealityInputSource inputSource = null, MixedRealityInteractionMapping[] interactions = null)
1818
: base(trackingState, controllerHandedness, inputSource, interactions)

Assets/MixedRealityToolkit/_Core/Devices/OpenVR/OpenVRDeviceManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Core.Devices.OpenVR
1212
/// <summary>
1313
/// Manages Open VR Devices using unity's input system.
1414
/// </summary>
15-
public class OpenVRDeviceManager : UnityDeviceManager
15+
public class OpenVRDeviceManager : UnityJoystickManager
1616
{
1717
/// <summary>
1818
/// Constructor.
@@ -24,7 +24,7 @@ public OpenVRDeviceManager(string name, uint priority) : base(name, priority) {
2424
#region Controller Utilities
2525

2626
/// <inheritdoc />
27-
protected override GenericUnityController GetOrAddController(string joystickName)
27+
protected override GenericJoystickController GetOrAddController(string joystickName)
2828
{
2929
// If a device is already registered with the ID provided, just return it.
3030
if (ActiveControllers.ContainsKey(joystickName))

Assets/MixedRealityToolkit/_Core/Devices/UnityInput/GenericUnityController.cs renamed to Assets/MixedRealityToolkit/_Core/Devices/UnityInput/GenericJoystickController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
namespace Microsoft.MixedReality.Toolkit.Core.Devices.UnityInput
1010
{
11-
public class GenericUnityController : BaseController
11+
public class GenericJoystickController : BaseController
1212
{
13-
public GenericUnityController(TrackingState trackingState, Handedness controllerHandedness, IMixedRealityInputSource inputSource = null, MixedRealityInteractionMapping[] interactions = null)
13+
public GenericJoystickController(TrackingState trackingState, Handedness controllerHandedness, IMixedRealityInputSource inputSource = null, MixedRealityInteractionMapping[] interactions = null)
1414
: base(trackingState, controllerHandedness, inputSource, interactions)
1515
{
1616
}

Assets/MixedRealityToolkit/_Core/Devices/UnityInput/GenericUnityController.cs.meta renamed to Assets/MixedRealityToolkit/_Core/Devices/UnityInput/GenericJoystickController.cs.meta

File renamed without changes.

Assets/MixedRealityToolkit/_Core/Devices/UnityInput/UnityDeviceManager.cs renamed to Assets/MixedRealityToolkit/_Core/Devices/UnityInput/UnityJoystickManager.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
namespace Microsoft.MixedReality.Toolkit.Core.Devices.UnityInput
1313
{
1414
/// <summary>
15-
/// Manages devices using unity input system.
15+
/// Manages joysticks using unity input system.
1616
/// </summary>
17-
public class UnityDeviceManager : BaseDeviceManager
17+
public class UnityJoystickManager : BaseDeviceManager
1818
{
1919
/// <summary>
2020
/// Constructor.
2121
/// </summary>
2222
/// <param name="name"></param>
2323
/// <param name="priority"></param>
24-
public UnityDeviceManager(string name, uint priority) : base(name, priority) { }
24+
public UnityJoystickManager(string name, uint priority) : base(name, priority) { }
2525

2626
private const float DeviceRefreshInterval = 3.0f;
2727

28-
protected static readonly Dictionary<string, GenericUnityController> ActiveControllers = new Dictionary<string, GenericUnityController>();
28+
protected static readonly Dictionary<string, GenericJoystickController> ActiveControllers = new Dictionary<string, GenericJoystickController>();
2929

3030
private float deviceRefreshTimer;
3131
private string[] lastDeviceList;
@@ -119,7 +119,7 @@ private void RefreshDevices()
119119
/// </summary>
120120
/// <param name="joystickName">The name of they joystick from Unity's <see cref="Input.GetJoystickNames"/></param>
121121
/// <returns>A new controller reference.</returns>
122-
protected virtual GenericUnityController GetOrAddController(string joystickName)
122+
protected virtual GenericJoystickController GetOrAddController(string joystickName)
123123
{
124124
if (ActiveControllers.ContainsKey(joystickName))
125125
{
@@ -135,15 +135,15 @@ protected virtual GenericUnityController GetOrAddController(string joystickName)
135135
default:
136136
return null;
137137
case SupportedControllerType.GenericUnity:
138-
controllerType = typeof(GenericUnityController);
138+
controllerType = typeof(GenericJoystickController);
139139
break;
140140
case SupportedControllerType.Xbox:
141141
controllerType = typeof(XboxController);
142142
break;
143143
}
144144

145145
var inputSource = InputSystem?.RequestNewGenericInputSource($"{controllerType.Name} Controller");
146-
var detectedController = Activator.CreateInstance(controllerType, TrackingState.NotTracked, Handedness.None, inputSource, null) as GenericUnityController;
146+
var detectedController = Activator.CreateInstance(controllerType, TrackingState.NotTracked, Handedness.None, inputSource, null) as GenericJoystickController;
147147

148148
if (detectedController == null)
149149
{

Assets/MixedRealityToolkit/_Core/Devices/UnityInput/UnityDeviceManager.cs.meta renamed to Assets/MixedRealityToolkit/_Core/Devices/UnityInput/UnityJoystickManager.cs.meta

File renamed without changes.

Assets/MixedRealityToolkit/_Core/Devices/UnityInput/XboxController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Microsoft.MixedReality.Toolkit.Core.Devices.UnityInput
1111
/// <summary>
1212
/// Xbox Controller using Unity Input System
1313
/// </summary>
14-
public class XboxController : GenericUnityController
14+
public class XboxController : GenericJoystickController
1515
{
1616
/// <summary>
1717
/// Constructor.

Assets/MixedRealityToolkit/_Core/Inspectors/Profiles/MixedRealityControllerMappingProfileInspector.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ private void RenderControllerProfilesList(SerializedProperty controllerList, boo
191191
useCustomInteractionMappings.boolValue = true;
192192
mixedRealityControllerInteractions.ClearArray();
193193
serializedObject.ApplyModifiedProperties();
194-
thisProfile.MixedRealityControllerMappingProfiles[controllerList.arraySize - 1].ControllerType.Type = typeof(GenericUnityController);
194+
thisProfile.MixedRealityControllerMappingProfiles[controllerList.arraySize - 1].ControllerType.Type = typeof(GenericJoystickController);
195195
return;
196196
}
197197

@@ -238,7 +238,7 @@ private void RenderControllerProfilesList(SerializedProperty controllerList, boo
238238
{
239239
supportedControllerType = SupportedControllerType.GenericOpenVR;
240240
}
241-
else if (controllerType == typeof(GenericUnityController))
241+
else if (controllerType == typeof(GenericJoystickController))
242242
{
243243
supportedControllerType = SupportedControllerType.GenericUnity;
244244
}
@@ -302,7 +302,7 @@ private void RenderControllerProfilesList(SerializedProperty controllerList, boo
302302

303303
int currentGenericType = -1;
304304

305-
if (controllerType == typeof(GenericUnityController))
305+
if (controllerType == typeof(GenericJoystickController))
306306
{
307307
currentGenericType = 0;
308308
}
@@ -316,7 +316,7 @@ private void RenderControllerProfilesList(SerializedProperty controllerList, boo
316316

317317
currentGenericType = EditorGUILayout.IntPopup(GenericTypeContent, currentGenericType, GenericTypeListContent, GenericTypeIds);
318318

319-
if (controllerType != typeof(GenericUnityController))
319+
if (controllerType != typeof(GenericJoystickController))
320320
{
321321
EditorGUILayout.PropertyField(controllerHandedness);
322322
}
@@ -326,7 +326,7 @@ private void RenderControllerProfilesList(SerializedProperty controllerList, boo
326326
switch (currentGenericType)
327327
{
328328
case 0:
329-
controllerType = typeof(GenericUnityController);
329+
controllerType = typeof(GenericJoystickController);
330330
controllerHandedness.intValue = 0;
331331
break;
332332
case 1:

Assets/MixedRealityToolkit/_Core/Managers/MixedRealityManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ private void AddManagersForTheCurrentPlatform()
949949
case RuntimePlatform.WindowsEditor:
950950
case RuntimePlatform.OSXPlayer:
951951
case RuntimePlatform.OSXEditor:
952-
AddManager(typeof(IMixedRealityDeviceManager), new UnityDeviceManager("Unity Device Manager", 10));
952+
AddManager(typeof(IMixedRealityDeviceManager), new UnityJoystickManager("Unity Joystick Manager", 10));
953953
AddManager(typeof(IMixedRealityDeviceManager), new OpenVRDeviceManager("Unity OpenVR Device Manager", 10));
954954
break;
955955
case RuntimePlatform.IPhonePlayer:
@@ -975,7 +975,7 @@ private void AddManagersForTheCurrentPlatformEditor()
975975
case UnityEditor.BuildTarget.StandaloneWindows:
976976
case UnityEditor.BuildTarget.StandaloneWindows64:
977977
case UnityEditor.BuildTarget.StandaloneOSX:
978-
AddManager(typeof(IMixedRealityDeviceManager), new UnityDeviceManager("Unity Device Manager", 10));
978+
AddManager(typeof(IMixedRealityDeviceManager), new UnityJoystickManager("Unity Device Manager", 10));
979979
AddManager(typeof(IMixedRealityDeviceManager), new OpenVRDeviceManager("Unity OpenVR Device Manager", 10));
980980
break;
981981
case UnityEditor.BuildTarget.iOS:

0 commit comments

Comments
 (0)