Skip to content

Commit 1c8ebf7

Browse files
unoctium1lawwong
authored andcommitted
Add version checks for blend weights vs skin weights
1 parent 9468e44 commit 1c8ebf7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@ public OculusGoRecommendedSettings()
280280
if (lv2qualitySetting.FindPropertyRelative("anisotropicTextures").intValue != (int)AnisotropicFiltering.Disable) { return false; }
281281
var antiAliasingLevel = lv2qualitySetting.FindPropertyRelative("antiAliasing").intValue; if (antiAliasingLevel > 4 || antiAliasingLevel < 2) { return false; }
282282
if (lv2qualitySetting.FindPropertyRelative("shadows").intValue >= (int)ShadowQuality.All) { return false; }
283+
#if UNITY_2019_1_OR_NEWER
284+
if (lv2qualitySetting.FindPropertyRelative("skinWeights").intValue > 2) { return false; }
285+
#else
283286
if (lv2qualitySetting.FindPropertyRelative("blendWeights").intValue > 2) { return false; }
287+
#endif
284288
if (lv2qualitySetting.FindPropertyRelative("vSyncCount").intValue != 0) { return false; }
285289

286290
return true;
@@ -339,8 +343,13 @@ public OculusGoRecommendedSettings()
339343
var shadowsProp = lv2qualitySetting.FindPropertyRelative("shadows");
340344
if (shadowsProp.intValue >= (int)ShadowQuality.All) { shadowsProp.intValue = (int)ShadowQuality.HardOnly; }
341345

346+
#if UNITY_2019_1_OR_NEWER
347+
var blendWeightsProp = lv2qualitySetting.FindPropertyRelative("skinWeights");
348+
if (blendWeightsProp.intValue > 2) { blendWeightsProp.intValue = 2; }
349+
#else
342350
var blendWeightsProp = lv2qualitySetting.FindPropertyRelative("blendWeights");
343351
if (blendWeightsProp.intValue > 2) { blendWeightsProp.intValue = 2; }
352+
#endif
344353

345354
lv2qualitySetting.FindPropertyRelative("vSyncCount").intValue = 0;
346355

0 commit comments

Comments
 (0)