Skip to content

Commit b96c786

Browse files
committed
2.3.1b - Added no skeleton input fallback, bug fixes
Changes for 2.3.1b * Added legacy mixed reality camera mode (enabled by default). You can change this in SteamVR/Resources/SteamVR_Settings. * Fixing some errors for 2019.1 * Removing an unused editor class * Added low fidelity fallback hand animation for when no skeleton data is available (WinMR) * Fixing OpenVR Package not required error for pre 2018.2 versions of unity * Fixed serializable event in Throwable * Fix for Custom Skeleton not getting initialized * Fix for a rare failure in action retrieval (#431) * Allowing folders in the action path. (#443) * Fix for multiple SteamVR_Behaviours initializing (#435) * Stop updating poses if they're not active
1 parent 5107b09 commit b96c786

40 files changed

+2643
-681
lines changed

Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static SteamVR_AutoEnableVR()
2323
protected const string openVRString = "OpenVR";
2424
protected const string openVRPackageString = "com.unity.xr.openvr.standalone";
2525

26-
#if UNITY_2018_1_OR_NEWER
26+
#if UNITY_2018_2_OR_NEWER
2727
private enum PackageStates
2828
{
2929
None,
@@ -91,7 +91,7 @@ public static void Update()
9191
Debug.Log("<b>[SteamVR Setup]</b> Added OpenVR to supported VR SDKs list.");
9292
}
9393

94-
#if UNITY_2018_1_OR_NEWER
94+
#if UNITY_2018_2_OR_NEWER
9595
//2018+ requires us to manually add the OpenVR package
9696

9797
switch (packageState)

Assets/SteamVR/Editor/SteamVR_UnitySettingsWindow.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ static void Update()
9292
PlayerSettings.defaultScreenHeight != recommended_DefaultScreenHeight)) ||
9393
(!EditorPrefs.HasKey(ignore + runInBackground) &&
9494
PlayerSettings.runInBackground != recommended_RunInBackground) ||
95+
#if !UNITY_2019_1_OR_NEWER
9596
(!EditorPrefs.HasKey(ignore + displayResolutionDialog) &&
9697
PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog) ||
98+
#endif
9799
(!EditorPrefs.HasKey(ignore + resizableWindow) &&
98100
PlayerSettings.resizableWindow != recommended_ResizableWindow) ||
99101
(!EditorPrefs.HasKey(ignore + visibleInBackground) &&
@@ -320,6 +322,7 @@ public void OnGUI()
320322
GUILayout.EndHorizontal();
321323
}
322324

325+
#if !UNITY_2019_1_OR_NEWER
323326
if (!EditorPrefs.HasKey(ignore + displayResolutionDialog) &&
324327
PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog)
325328
{
@@ -343,6 +346,7 @@ public void OnGUI()
343346

344347
GUILayout.EndHorizontal();
345348
}
349+
#endif
346350

347351
if (!EditorPrefs.HasKey(ignore + resizableWindow) &&
348352
PlayerSettings.resizableWindow != recommended_ResizableWindow)
@@ -593,8 +597,10 @@ public void OnGUI()
593597
}
594598
if (!EditorPrefs.HasKey(ignore + runInBackground))
595599
PlayerSettings.runInBackground = recommended_RunInBackground;
600+
#if !UNITY_2019_1_OR_NEWER
596601
if (!EditorPrefs.HasKey(ignore + displayResolutionDialog))
597602
PlayerSettings.displayResolutionDialog = recommended_DisplayResolutionDialog;
603+
#endif
598604
if (!EditorPrefs.HasKey(ignore + resizableWindow))
599605
PlayerSettings.resizableWindow = recommended_ResizableWindow;
600606
if (!EditorPrefs.HasKey(ignore + visibleInBackground))
@@ -648,8 +654,10 @@ public void OnGUI()
648654
EditorPrefs.SetBool(ignore + defaultScreenSize, true);
649655
if (PlayerSettings.runInBackground != recommended_RunInBackground)
650656
EditorPrefs.SetBool(ignore + runInBackground, true);
657+
#if !UNITY_2019_1_OR_NEWER
651658
if (PlayerSettings.displayResolutionDialog != recommended_DisplayResolutionDialog)
652659
EditorPrefs.SetBool(ignore + displayResolutionDialog, true);
660+
#endif
653661
if (PlayerSettings.resizableWindow != recommended_ResizableWindow)
654662
EditorPrefs.SetBool(ignore + resizableWindow, true);
655663
if (PlayerSettings.visibleInBackground != recommended_VisibleInBackground)

Assets/SteamVR/Extras/SteamVR_LaserPointer.unity

Lines changed: 34 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ GameObject:
102102
- 135: {fileID: 24851823}
103103
- 23: {fileID: 24851822}
104104
- 54: {fileID: 24851821}
105-
- 114: {fileID: 24851826}
106105
m_Layer: 0
107106
m_Name: Sphere
108107
m_TagString: Untagged
@@ -186,47 +185,7 @@ Transform:
186185
m_Children: []
187186
m_Father: {fileID: 0}
188187
m_RootOrder: 3
189-
--- !u!114 &24851826
190-
MonoBehaviour:
191-
m_ObjectHideFlags: 0
192-
m_PrefabParentObject: {fileID: 0}
193-
m_PrefabInternal: {fileID: 0}
194-
m_GameObject: {fileID: 24851820}
195-
m_Enabled: 1
196-
m_EditorHideFlags: 0
197-
m_Script: {fileID: 11500000, guid: 23cd37f308d6fc040873615e9982a85e, type: 3}
198-
m_Name:
199-
m_EditorClassIdentifier:
200-
--- !u!21 &274413288
201-
Material:
202-
serializedVersion: 6
203-
m_ObjectHideFlags: 0
204-
m_PrefabParentObject: {fileID: 0}
205-
m_PrefabInternal: {fileID: 0}
206-
m_Name: Sprites/Default
207-
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
208-
m_ShaderKeywords:
209-
m_LightmapFlags: 5
210-
m_CustomRenderQueue: -1
211-
stringTagMap: {}
212-
m_SavedProperties:
213-
serializedVersion: 2
214-
m_TexEnvs:
215-
- first:
216-
name: _MainTex
217-
second:
218-
m_Texture: {fileID: 0}
219-
m_Scale: {x: 1, y: 1}
220-
m_Offset: {x: 0, y: 0}
221-
m_Floats:
222-
- first:
223-
name: PixelSnap
224-
second: 0
225-
m_Colors:
226-
- first:
227-
name: _Color
228-
second: {r: 1, g: 1, b: 1, a: 1}
229-
--- !u!43 &907364991
188+
--- !u!43 &33627688
230189
Mesh:
231190
m_ObjectHideFlags: 0
232191
m_PrefabParentObject: {fileID: 0}
@@ -354,6 +313,35 @@ Mesh:
354313
m_BakedConvexCollisionMesh:
355314
m_BakedTriangleCollisionMesh:
356315
m_MeshOptimized: 0
316+
--- !u!21 &1231479188
317+
Material:
318+
serializedVersion: 6
319+
m_ObjectHideFlags: 0
320+
m_PrefabParentObject: {fileID: 0}
321+
m_PrefabInternal: {fileID: 0}
322+
m_Name: Sprites/Default
323+
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
324+
m_ShaderKeywords:
325+
m_LightmapFlags: 5
326+
m_CustomRenderQueue: -1
327+
stringTagMap: {}
328+
m_SavedProperties:
329+
serializedVersion: 2
330+
m_TexEnvs:
331+
- first:
332+
name: _MainTex
333+
second:
334+
m_Texture: {fileID: 0}
335+
m_Scale: {x: 1, y: 1}
336+
m_Offset: {x: 0, y: 0}
337+
m_Floats:
338+
- first:
339+
name: PixelSnap
340+
second: 0
341+
m_Colors:
342+
- first:
343+
name: _Color
344+
second: {r: 1, g: 1, b: 1, a: 1}
357345
--- !u!1001 &1474170597
358346
Prefab:
359347
m_ObjectHideFlags: 0
@@ -396,11 +384,11 @@ Prefab:
396384
- target: {fileID: 3380982, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
397385
propertyPath: m_Mesh
398386
value:
399-
objectReference: {fileID: 907364991}
387+
objectReference: {fileID: 33627688}
400388
- target: {fileID: 2348914, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
401389
propertyPath: m_Materials.Array.data[0]
402390
value:
403-
objectReference: {fileID: 274413288}
391+
objectReference: {fileID: 1231479188}
404392
m_RemovedComponents: []
405393
m_ParentPrefab: {fileID: 100100000, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
406394
m_IsPrefabParent: 0
@@ -424,9 +412,7 @@ MonoBehaviour:
424412
m_Name:
425413
m_EditorClassIdentifier:
426414
pose: {fileID: 0}
427-
interactWithUI:
428-
actionPath: /actions/default/in/InteractUI
429-
needsReinit: 0
415+
interactWithUI: {fileID: 11400000, guid: 4a1ec738249f25e4f824949a16c0b085, type: 2}
430416
active: 1
431417
color: {r: 0, g: 0, b: 0, a: 0}
432418
thickness: 0.002
@@ -447,9 +433,7 @@ MonoBehaviour:
447433
m_Name:
448434
m_EditorClassIdentifier:
449435
pose: {fileID: 0}
450-
interactWithUI:
451-
actionPath: /actions/default/in/InteractUI
452-
needsReinit: 0
436+
interactWithUI: {fileID: 11400000, guid: 4a1ec738249f25e4f824949a16c0b085, type: 2}
453437
active: 1
454438
color: {r: 0, g: 0, b: 0, a: 0}
455439
thickness: 0.002

Assets/SteamVR/Input/Editor/SteamVR_Input_PostProcessBuild.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj
1414
SteamVR_Input.InitializeFile();
1515

1616
FileInfo fileInfo = new FileInfo(pathToBuiltProject);
17-
string buildPath = fileInfo.Directory.FullName;
17+
string buildPath = Path.Combine(fileInfo.Directory.FullName, Path.GetDirectoryName(SteamVR_Settings.instance.actionsFilePath));
1818

1919
bool overwrite = EditorPrefs.GetBool(SteamVR_Input_Generator.steamVRInputOverwriteBuildKey);
2020

Assets/SteamVR/Input/SteamVR_Action_Pose.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,11 @@ public virtual void UpdateValue(bool skipStateAndEventUpdates)
572572
Debug.LogError("<b>[SteamVR]</b> GetPoseActionData error (" + fullPath + "): " + err.ToString() + " Handle: " + handle.ToString() + ". Input source: " + inputSource.ToString());
573573
}
574574

575-
SetCacheVariables();
576-
changed = GetChanged();
575+
if (active)
576+
{
577+
SetCacheVariables();
578+
changed = GetChanged();
579+
}
577580

578581
if (changed)
579582
changedTime = updateTime;

0 commit comments

Comments
 (0)