Skip to content

Commit d378bdc

Browse files
committed
Update version code to v1.18.2
* Bug Fixes - Fix Meta Pro controller input not handled when using latest Oculus plugin - Fix unable to enable platform support in VIU Settings when using latest Unity XR Plugin Management
2 parents f266c2b + 1bcc4c8 commit d378bdc

File tree

16 files changed

+40
-29
lines changed

16 files changed

+40
-29
lines changed

Assets/HTC.UnityPlugin/VRModule/Modules/OculusVRModule.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ public override void BeforeRenderUpdate()
815815
case VRModuleDeviceModel.OculusTouchLeft:
816816
case VRModuleDeviceModel.OculusQuestControllerLeft:
817817
case VRModuleDeviceModel.OculusQuest2ControllerLeft:
818+
case VRModuleDeviceModel.OculusTouchProLeft:
818819
{
819820
var ctrlState = OVRPlugin.GetControllerState((uint)OVRPlugin.Controller.LTouch);
820821

@@ -842,6 +843,7 @@ public override void BeforeRenderUpdate()
842843
case VRModuleDeviceModel.OculusTouchRight:
843844
case VRModuleDeviceModel.OculusQuestControllerRight:
844845
case VRModuleDeviceModel.OculusQuest2ControllerRight:
846+
case VRModuleDeviceModel.OculusTouchProRight:
845847
{
846848
var ctrlState = OVRPlugin.GetControllerState((uint)OVRPlugin.Controller.RTouch);
847849

Assets/HTC.UnityPlugin/VRModule/Modules/SimulatorModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ public override void OnDeactivated()
115115
}
116116
}
117117

118-
public override uint GetRightControllerDeviceIndex() { return RIGHT_INDEX; }
118+
public override uint GetRightControllerDeviceIndex() { return m_currStates != null && m_currStates[RIGHT_INDEX].isConnected ? RIGHT_INDEX : VRModule.INVALID_DEVICE_INDEX; }
119119

120-
public override uint GetLeftControllerDeviceIndex() { return LEFT_INDEX; }
120+
public override uint GetLeftControllerDeviceIndex() { return m_currStates != null && m_currStates[LEFT_INDEX].isConnected ? LEFT_INDEX : VRModule.INVALID_DEVICE_INDEX; }
121121

122122
public override void Update()
123123
{

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/OculusGoSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ public override bool support
506506
if (editorGraphicsJobs) { return false; }
507507
#if UNITY_2019_3_OR_NEWER
508508
if (!VIUSettings.activateOculusVRModule && !VIUSettings.activateUnityXRModule) { return false; }
509-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OculusVRModule.OCULUS_XR_LOADER_NAME, requirdPlatform)) { return false; }
509+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OculusVRModule.OCULUS_XR_LOADER_NAME, OculusVRModule.OCULUS_XR_LOADER_CLASS_NAME, requirdPlatform)) { return false; }
510510
#else
511511
if (!VIUSettings.activateOculusVRModule && !VIUSettings.activateUnityNativeVRModule) { return false; }
512512
if (!OculusSDK.enabled) { return false; }

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/OculusSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public override bool support
144144
if (!canSupport) { return false; }
145145
#if UNITY_2019_3_OR_NEWER
146146
if (!VIUSettings.activateOculusVRModule && !VIUSettings.activateUnityXRModule) { return false; }
147-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OculusVRModule.OCULUS_XR_LOADER_NAME, requirdPlatform)) { return false; }
147+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OculusVRModule.OCULUS_XR_LOADER_NAME, OculusVRModule.OCULUS_XR_LOADER_CLASS_NAME, requirdPlatform)) { return false; }
148148
#elif UNITY_5_5_OR_NEWER
149149
if (!VIUSettings.activateOculusVRModule && !VIUSettings.activateUnityNativeVRModule) { return false; }
150150
if (!OculusSDK.enabled) { return false; }

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/OpenVRSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public override bool support
406406
{
407407
if (!canSupport) { return false; }
408408
#if UNITY_2019_3_OR_NEWER
409-
return (VIUSettings.activateSteamVRModule || VIUSettings.activateUnityXRModule) && XRPluginManagementUtils.IsXRLoaderEnabled(SteamVRModule.OPENVR_XR_LOADER_NAME, requirdPlatform);
409+
return (VIUSettings.activateSteamVRModule || VIUSettings.activateUnityXRModule) && XRPluginManagementUtils.IsXRLoaderEnabled(SteamVRModule.OPENVR_XR_LOADER_NAME, SteamVRModule.OPENVR_XR_LOADER_CLASS_NAME, requirdPlatform);
410410
#elif UNITY_5_5_OR_NEWER
411411
return (VIUSettings.activateSteamVRModule || VIUSettings.activateUnityNativeVRModule) && OpenVRSDK.enabled;
412412
#elif UNITY_5_4_OR_NEWER
@@ -629,7 +629,7 @@ public override void OnPreferenceGUI()
629629
{
630630
bool isPackageInstalled = PackageManagerHelper.IsPackageInList(OPENVR_XR_PACKAGE_NAME) ||
631631
PackageManagerHelper.IsPackageInList(OPENVR_XR_PACKAGE_NAME_OLD);
632-
bool isLoaderEnabled = XRPluginManagementUtils.IsXRLoaderEnabled(SteamVRModule.OPENVR_XR_LOADER_NAME, BuildTargetGroup.Standalone);
632+
bool isLoaderEnabled = XRPluginManagementUtils.IsXRLoaderEnabled(SteamVRModule.OPENVR_XR_LOADER_NAME, SteamVRModule.OPENVR_XR_LOADER_CLASS_NAME, BuildTargetGroup.Standalone);
633633
if (isPackageInstalled && !isLoaderEnabled)
634634
{
635635
XRPluginManagementUtils.SetXRLoaderEnabled(SteamVRModule.OPENVR_XR_LOADER_CLASS_NAME, BuildTargetGroup.Standalone, true);

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/OpenXRAndroidOculusSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public override bool canSupport
7979
if (PackageManagerHelper.IsPackageInList(WAVE_XR_OPENXR_PACKAGE)) { return false; }
8080
if (PackageManagerHelper.IsPackageInList(OCULUS_XR_PACKAGE_NAME)) { return false; }
8181
if (!PackageManagerHelper.IsPackageInList(OPENXR_PLUGIN_PACKAGE_NAME)) { return false; }
82-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform)) { return false; }
82+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform)) { return false; }
8383
return true;
8484
}
8585
}
@@ -90,7 +90,7 @@ public override bool support
9090
{
9191
if (!canSupport) { return false; }
9292
if (!VIUSettings.activateUnityXRModule) { return false; }
93-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform)) { return false; }
93+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform)) { return false; }
9494
if (IsOpenXRFeatureGroupEnabled(requirdPlatform, WAVE_XR_OPENXR_FEATURE_ID)) { return false; }
9595
if (!IsOpenXRFeatureGroupEnabled(requirdPlatform, OCULUS_QUEST_OPENXR_FEATURE_ID)) { return false; }
9696
return true;
@@ -204,7 +204,7 @@ public override void OnPreferenceGUI()
204204
PackageManagerHelper.AddToPackageList(OPENXR_PLUGIN_PACKAGE_NAME);
205205
}
206206
}
207-
else if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform))
207+
else if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform))
208208
{
209209
GUI.enabled = false;
210210
ShowToggle(new GUIContent(s_title), false, GUILayout.Width(toggleWidth));

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/OpenXRAndroidWaveSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public override bool canSupport
8585
if (PackageManagerHelper.IsPackageInList(OCULUS_XR_PACKAGE_NAME)) { return false; }
8686
if (PackageManagerHelper.IsPackageInList(WAVE_XR_PACKAGE_NAME)) { return false; }
8787
if (!PackageManagerHelper.IsPackageInList(WAVE_XR_OPENXR_PACKAGE)) { return false; }
88-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform)) { return false; }
88+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform)) { return false; }
8989
return true;
9090
}
9191
}
@@ -96,7 +96,7 @@ public override bool support
9696
{
9797
if (!canSupport) { return false; }
9898
if (!VIUSettings.activateUnityXRModule) { return false; }
99-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform)) { return false; }
99+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform)) { return false; }
100100
if (IsOpenXRFeatureGroupEnabled(requirdPlatform, OCULUS_QUEST_OPENXR_FEATURE_ID)) { return false; }
101101
if (!IsOpenXRFeatureGroupEnabled(requirdPlatform, WAVE_XR_OPENXR_FEATURE_ID)) { return false; }
102102
return true;
@@ -204,7 +204,7 @@ public override void OnPreferenceGUI()
204204
PackageManagerHelper.AddToPackageList(WAVE_XR_OPENXR_PACKAGE);
205205
}
206206
}
207-
else if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform))
207+
else if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform))
208208
{
209209
GUI.enabled = false;
210210
ShowToggle(new GUIContent(s_title), false, GUILayout.Width(toggleWidth));

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/OpenXRDesktopSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override bool support
3131
{
3232
if (!canSupport) { return false; }
3333
if (!VIUSettings.activateUnityXRModule) { return false; }
34-
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform)) { return false; }
34+
if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform)) { return false; }
3535
return true;
3636
}
3737
set
@@ -84,7 +84,7 @@ public override void OnPreferenceGUI()
8484
PackageManagerHelper.AddToPackageList(OPENXR_PLUGIN_PACKAGE_NAME);
8585
}
8686
}
87-
else if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, requirdPlatform))
87+
else if (!XRPluginManagementUtils.IsXRLoaderEnabled(OPENXR_PLUGIN_LOADER_NAME, OPENXR_PLUGIN_LOADER_TYPE, requirdPlatform))
8888
{
8989
GUI.enabled = false;
9090
ShowToggle(s_title, false, GUILayout.Width(toggleWidth));

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/UnityXRSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public UnityXRRecommendedSettings()
2727
Add(new VIUVersionCheck.RecommendedSetting<int>
2828
{
2929
settingTitle = "Review OpenXR Project Validation Issues",
30-
skipCheckFunc = () => !VIUSettingsEditor.PackageManagerHelper.IsPackageInList(VIUSettingsEditor.OPENXR_PLUGIN_PACKAGE_NAME) || !XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.OPENXR_LOADER_NAME, VIUSettingsEditor.activeBuildTargetGroup),
30+
skipCheckFunc = () => !VIUSettingsEditor.PackageManagerHelper.IsPackageInList(VIUSettingsEditor.OPENXR_PLUGIN_PACKAGE_NAME) || !XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.OPENXR_LOADER_NAME, UnityXRModule.OPENXR_LOADER_CLASS_NAME, VIUSettingsEditor.activeBuildTargetGroup),
3131
currentValueFunc = () => {
3232
OpenXRProjectValidation.GetCurrentValidationIssues(s_tempOpenXRValidationIssues, VIUSettingsEditor.activeBuildTargetGroup);
3333
return s_tempOpenXRValidationIssues.Count;
@@ -60,7 +60,7 @@ public UnityXRRecommendedSettings()
6060
Add(new VIUVersionCheck.RecommendedSetting<bool>
6161
{
6262
settingTitle = "Enable All Feature Sets",
63-
skipCheckFunc = () => !VIUSettingsEditor.PackageManagerHelper.IsPackageInList(VIUSettingsEditor.OPENXR_PLUGIN_PACKAGE_NAME) || !XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.OPENXR_LOADER_NAME, VIUSettingsEditor.activeBuildTargetGroup),
63+
skipCheckFunc = () => !VIUSettingsEditor.PackageManagerHelper.IsPackageInList(VIUSettingsEditor.OPENXR_PLUGIN_PACKAGE_NAME) || !XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.OPENXR_LOADER_NAME, UnityXRModule.OPENXR_LOADER_CLASS_NAME, VIUSettingsEditor.activeBuildTargetGroup),
6464
currentValueFunc = () =>
6565
{
6666
return OpenXRSettings.ActiveBuildTargetInstance.GetFeatures<OpenXRInteractionFeature>().All(feature => feature.enabled);

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings/WaveVRSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public override bool support
127127
if (!VIUSettings.activateWaveVRModule) { return false; }
128128

129129
#if VIU_XR_GENERAL_SETTINGS
130-
if (!(MockHMDSDK.enabled || XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.WAVE_XR_LOADER_NAME, requirdPlatform)))
130+
if (!(MockHMDSDK.enabled || XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.WAVE_XR_LOADER_NAME, UnityXRModule.WAVE_XR_LOADER_CLASS_NAME, requirdPlatform)))
131131
{
132132
return false;
133133
}
@@ -453,7 +453,7 @@ public override void OnPreferenceGUI()
453453
if (VIUProjectSettings.Instance.isInstallingWaveXRPlugin)
454454
{
455455
bool isPackageInstalled = PackageManagerHelper.IsPackageInList(WAVE_XR_PACKAGE_NAME);
456-
bool isLoaderEnabled = XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.WAVE_XR_LOADER_NAME, BuildTargetGroup.Android);
456+
bool isLoaderEnabled = XRPluginManagementUtils.IsXRLoaderEnabled(UnityXRModule.WAVE_XR_LOADER_NAME, UnityXRModule.WAVE_XR_LOADER_CLASS_NAME, BuildTargetGroup.Android);
457457
if (isPackageInstalled && !isLoaderEnabled)
458458
{
459459
XRPluginManagementUtils.SetXRLoaderEnabled(UnityXRModule.WAVE_XR_LOADER_CLASS_NAME, BuildTargetGroup.Android, true);

0 commit comments

Comments
 (0)