Skip to content

Commit 2ed8d93

Browse files
author
lawwong
committed
Update to v1.10.6
* Bug Fix - Fix SteamVR Plugin v2.4.5 incompatibility due to action manifest path changes 5fb6319 - Fix some Oculus(Android) recommend settings not working in Unity 2019.1 or newer 1c8ebf7
2 parents bc79dcf + 5cfb83a commit 2ed8d93

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

Assets/HTC.UnityPlugin/VRModule/Modules/Editor/SteamVRModuleEditor.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,24 @@ public SteamVRSymbolRequirementCollection()
133133
}
134134
},
135135
});
136+
137+
Add(new SymbolRequirement()
138+
{
139+
symbol = "VIU_STEAMVR_2_4_0_OR_NEWER",
140+
reqMethods = new SymbolRequirement.ReqMethodInfo[]
141+
{
142+
new SymbolRequirement.ReqMethodInfo()
143+
{
144+
typeName = "Valve.VR.SteamVR_Input",
145+
name = "GetActionsFilePath",
146+
argTypeNames = new string[]
147+
{
148+
"System.Boolean",
149+
},
150+
bindingAttr = BindingFlags.Public | BindingFlags.Static,
151+
}
152+
},
153+
});
136154
}
137155
}
138156
}

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

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ private string exampleDirPath
4141

4242
public RecommendedSteamVRInputFileSettings()
4343
{
44+
#if VIU_STEAMVR_2_4_0_OR_NEWER
45+
m_mainDirPath = Path.GetDirectoryName(SteamVR_Input.GetActionsFilePath());
46+
#else
4447
m_mainDirPath = Path.GetFullPath(Application.dataPath + "/../");
48+
#endif
4549
m_partialDirPath = VIUProjectSettings.partialActionDirPath;
4650
m_partialFileName = VIUProjectSettings.partialActionFileName;
4751

@@ -77,6 +81,11 @@ private void Merge(bool value)
7781
{
7882
if (!value) { return; }
7983

84+
if (!Directory.Exists(m_mainDirPath))
85+
{
86+
Directory.CreateDirectory(m_mainDirPath);
87+
}
88+
8089
VIUSteamVRActionFile mainFile;
8190
VIUSteamVRActionFile exampleFile;
8291
VIUSteamVRActionFile partialFile;

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Misc/SteamVRExtension/Editor/VIUSteamVRLoadJsonFileBase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public void Save(string dirPath)
8585

8686
var json = JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
8787
File.WriteAllText(Path.Combine(dirPath, fileName), json);
88-
8988
}
9089
catch (Exception e)
9190
{

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/VIUVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ namespace HTC.UnityPlugin.Vive
66
{
77
public static class VIUVersion
88
{
9-
public static readonly Version current = new Version("1.10.5.0");
9+
public static readonly Version current = new Version("1.10.6.0");
1010
}
1111
}

0 commit comments

Comments
 (0)