Skip to content

Commit a2c6d44

Browse files
author
lawwong
committed
Fix script compatability in WaveVRSettings
1 parent 763198a commit a2c6d44

File tree

1 file changed

+10
-2
lines changed
  • Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Editor/VRPlatformSettings

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public override void OnPreferenceGUI()
286286
EditorGUILayout.BeginHorizontal();
287287
#if VIU_WAVEXR_ESSENCE_CONTROLLER_MODEL || VIU_WAVEXR_ESSENCE_RENDERMODEL
288288
VIUSettings.enableWaveXRRenderModel = EditorGUILayout.ToggleLeft(new GUIContent(enableWaveXRRenderModelTitle, VIUSettings.ENABLE_WAVE_XR_RENDER_MODEL_TOOLTIP), VIUSettings.enableWaveXRRenderModel);
289-
#else
289+
#elif UNITY_2018_1_OR_NEWER
290290
GUI.enabled = false;
291291
EditorGUILayout.ToggleLeft(new GUIContent(enableWaveXRRenderModelTitle, VIUSettings.ENABLE_WAVE_XR_RENDER_MODEL_TOOLTIP + ". Required Wave XR Plugin Essence"), false, GUILayout.ExpandWidth(true));
292292
GUI.enabled = true;
@@ -307,6 +307,10 @@ public override void OnPreferenceGUI()
307307
VIUProjectSettings.Instance.isInstallingWaveXRPlugin = true;
308308
}
309309
EditorGUI.BeginChangeCheck();
310+
#else
311+
GUI.enabled = false;
312+
EditorGUILayout.ToggleLeft(new GUIContent(enableWaveXRRenderModelTitle, "Unity 2018.1 or later version required."), false, GUILayout.ExpandWidth(true));
313+
GUI.enabled = true;
310314
#endif
311315
EditorGUILayout.EndHorizontal();
312316

@@ -322,7 +326,7 @@ public override void OnPreferenceGUI()
322326
VRModuleSettings.activateWaveHandTrackingSubmodule = shouldSupport;
323327
}
324328
}
325-
#else
329+
#elif UNITY_2018_1_OR_NEWER
326330
GUI.enabled = false;
327331
EditorGUILayout.ToggleLeft(new GUIContent(enableWaveHandTrackingTitle, "Wave XR Plugin Essence required."), false, GUILayout.ExpandWidth(true));
328332
GUI.enabled = true;
@@ -351,6 +355,10 @@ public override void OnPreferenceGUI()
351355
VIUProjectSettings.Instance.isInstallingWaveXRPlugin = true;
352356
}
353357
EditorGUI.BeginChangeCheck();
358+
#else
359+
GUI.enabled = false;
360+
EditorGUILayout.ToggleLeft(new GUIContent(enableWaveHandTrackingTitle, "Unity 2018.1 or later version required."), false, GUILayout.ExpandWidth(true));
361+
GUI.enabled = true;
354362
#endif
355363
EditorGUILayout.EndHorizontal();
356364

0 commit comments

Comments
 (0)