Skip to content

Commit de5f988

Browse files
committed
2.6.0b3 (sdk 1.13.10) - Upgrading to sdk 1.13.10
1 parent 8239f4f commit de5f988

File tree

5 files changed

+50
-27
lines changed

5 files changed

+50
-27
lines changed

Assets/SteamVR/OpenVRAutoUpdater/Editor/OpenVRAutoUpdater.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ private static double runningSeconds
6060

6161
static OpenVRAutoUpdater()
6262
{
63-
#if UNITY_2020_1_OR_NEWER || VALVE_UPDATE_FORCE
63+
#if UNITY_2020_1_OR_NEWER || VALVE_UPDATE_FORCE
6464
Start();
65-
#endif
65+
#endif
6666
}
6767

6868
public static void Start()

Assets/SteamVR/Plugins/openvr_api.cs

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
using System;
1010
using System.Runtime.InteropServices;
11+
using Valve.VR;
1112

1213
#if UNITY_5_3_OR_NEWER
1314
using UnityEngine;
@@ -79,11 +80,6 @@ public struct IVRSystem
7980
[MarshalAs(UnmanagedType.FunctionPtr)]
8081
internal _GetDeviceToAbsoluteTrackingPose GetDeviceToAbsoluteTrackingPose;
8182

82-
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
83-
internal delegate void _ResetSeatedZeroPose();
84-
[MarshalAs(UnmanagedType.FunctionPtr)]
85-
internal _ResetSeatedZeroPose ResetSeatedZeroPose;
86-
8783
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
8884
internal delegate HmdMatrix34_t _GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
8985
[MarshalAs(UnmanagedType.FunctionPtr)]
@@ -549,6 +545,11 @@ public struct IVRChaperone
549545
[MarshalAs(UnmanagedType.FunctionPtr)]
550546
internal _ForceBoundsVisible ForceBoundsVisible;
551547

548+
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
549+
internal delegate void _ResetZeroPose(ETrackingUniverseOrigin eTrackingUniverseOrigin);
550+
[MarshalAs(UnmanagedType.FunctionPtr)]
551+
internal _ResetZeroPose ResetZeroPose;
552+
552553
}
553554

554555
[StructLayout(LayoutKind.Sequential)]
@@ -1996,8 +1997,10 @@ public class Utils
19961997
{
19971998
public static IntPtr ToUtf8(string managedString)
19981999
{
1999-
if (string.IsNullOrEmpty(managedString))
2000+
if (managedString == null)
2001+
{
20002002
return IntPtr.Zero;
2003+
}
20012004

20022005
int size = System.Text.Encoding.UTF8.GetByteCount(managedString) + 1;
20032006
if (buffer.Length < size) buffer = new byte[size];
@@ -2082,10 +2085,6 @@ public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,floa
20822085
{
20832086
FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
20842087
}
2085-
public void ResetSeatedZeroPose()
2086-
{
2087-
FnTable.ResetSeatedZeroPose();
2088-
}
20892088
public HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose()
20902089
{
20912090
HmdMatrix34_t result = FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
@@ -2710,6 +2709,10 @@ public void ForceBoundsVisible(bool bForce)
27102709
{
27112710
FnTable.ForceBoundsVisible(bForce);
27122711
}
2712+
public void ResetZeroPose(ETrackingUniverseOrigin eTrackingUniverseOrigin)
2713+
{
2714+
FnTable.ResetZeroPose(eTrackingUniverseOrigin);
2715+
}
27132716
}
27142717

27152718

@@ -4692,6 +4695,7 @@ public enum ETrackedDeviceProperty
46924695
Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
46934696
Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
46944697
Prop_CameraSupportsCompatibilityModes_Bool = 2078,
4698+
Prop_SupportsRoomViewDepthProjection_Bool = 2079,
46954699
Prop_DisplayAvailableFrameRates_Float_Array = 2080,
46964700
Prop_DisplaySupportsMultipleFramerates_Bool = 2081,
46974701
Prop_DisplayColorMultLeft_Vector3 = 2082,
@@ -4898,6 +4902,7 @@ public enum EVREventType
48984902
VREvent_ChaperoneFlushCache = 805,
48994903
VREvent_ChaperoneRoomSetupStarting = 806,
49004904
VREvent_ChaperoneRoomSetupFinished = 807,
4905+
VREvent_StandingZeroPoseReset = 808,
49014906
VREvent_AudioSettingsHaveChanged = 820,
49024907
VREvent_BackgroundSettingHasChanged = 850,
49034908
VREvent_CameraSettingsHaveChanged = 851,
@@ -5145,7 +5150,8 @@ public enum EVRApplicationType
51455150
VRApplication_SteamWatchdog = 6,
51465151
VRApplication_Bootstrapper = 7,
51475152
VRApplication_WebHelper = 8,
5148-
VRApplication_Max = 9,
5153+
VRApplication_OpenXR = 9,
5154+
VRApplication_Max = 10,
51495155
}
51505156
public enum EVRFirmwareError
51515157
{
@@ -5975,6 +5981,9 @@ private static void _copysign(ref float sizeval, float signval)
59755981
}
59765982
[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPose_t
59775983
{
5984+
public IntPtr handle; // void *
5985+
public ETextureType eType;
5986+
public EColorSpace eColorSpace;
59785987
public HmdMatrix34_t mDeviceToAbsoluteTracking;
59795988
}
59805989
[StructLayout(LayoutKind.Sequential)] public struct VRTextureDepthInfo_t
@@ -5985,10 +5994,17 @@ private static void _copysign(ref float sizeval, float signval)
59855994
}
59865995
[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithDepth_t
59875996
{
5997+
public IntPtr handle; // void *
5998+
public ETextureType eType;
5999+
public EColorSpace eColorSpace;
59886000
public VRTextureDepthInfo_t depth;
59896001
}
59906002
[StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPoseAndDepth_t
59916003
{
6004+
public IntPtr handle; // void *
6005+
public ETextureType eType;
6006+
public EColorSpace eColorSpace;
6007+
public HmdMatrix34_t mDeviceToAbsoluteTracking;
59926008
public VRTextureDepthInfo_t depth;
59936009
}
59946010
[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
@@ -7491,14 +7507,14 @@ public static uint GetInitToken()
74917507
public const ulong k_ulOverlayHandleInvalid = 0;
74927508
public const uint k_unMaxDistortionFunctionParameters = 8;
74937509
public const uint k_unScreenshotHandleInvalid = 0;
7494-
public const string IVRSystem_Version = "IVRSystem_021";
7510+
public const string IVRSystem_Version = "IVRSystem_022";
74957511
public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
74967512
public const string IVRTrackedCamera_Version = "IVRTrackedCamera_006";
74977513
public const uint k_unMaxApplicationKeyLength = 128;
74987514
public const string k_pch_MimeType_HomeApp = "vr/home";
74997515
public const string k_pch_MimeType_GameTheater = "vr/game_theater";
75007516
public const string IVRApplications_Version = "IVRApplications_007";
7501-
public const string IVRChaperone_Version = "IVRChaperone_003";
7517+
public const string IVRChaperone_Version = "IVRChaperone_004";
75027518
public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
75037519
public const string IVRCompositor_Version = "IVRCompositor_026";
75047520
public const uint k_unVROverlayMaxKeyLength = 128;
@@ -7657,15 +7673,15 @@ public static uint GetInitToken()
76577673
public const string k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport";
76587674
public const string k_pch_Camera_Section = "camera";
76597675
public const string k_pch_Camera_EnableCamera_Bool = "enableCamera";
7660-
public const string k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard";
7676+
public const string k_pch_Camera_ShowOnController_Bool = "showOnController";
76617677
public const string k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
7662-
public const string k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView";
7678+
public const string k_pch_Camera_RoomView_Int32 = "roomView";
76637679
public const string k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
76647680
public const string k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
76657681
public const string k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
76667682
public const string k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
76677683
public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
7668-
public const string k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode";
7684+
public const string k_pch_Camera_RoomViewStyle_Int32 = "roomViewStyle";
76697685
public const string k_pch_audio_Section = "audio";
76707686
public const string k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice";
76717687
public const string k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride";
@@ -8147,5 +8163,5 @@ public static void Shutdown()
81478163

81488164

81498165
}
8166+
#endif
81508167

8151-
#endif

Assets/SteamVR/Scripts/SteamVR_ExternalCamera.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ public void ReadConfig()
119119
}
120120
}
121121

122+
System.IO.FileSystemWatcher watcher;
123+
#else
124+
}
125+
#endif
126+
122127
public void SetupPose(SteamVR_Action_Pose newCameraPose, SteamVR_Input_Sources newCameraSource)
123128
{
124129
cameraPose = newCameraPose;
@@ -142,10 +147,6 @@ void OnChanged(object source, System.IO.FileSystemEventArgs e)
142147
ReadConfig();
143148
}
144149

145-
System.IO.FileSystemWatcher watcher;
146-
#else
147-
}
148-
#endif
149150
Camera cam;
150151
Transform target;
151152
GameObject clipQuad;

Assets/SteamVR/Scripts/SteamVR_Menu.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ void OnGUI()
170170

171171
if (GUILayout.Button("Center View"))
172172
{
173-
var system = OpenVR.System;
174-
if (system != null)
175-
system.ResetSeatedZeroPose();
173+
var chaperone = OpenVR.Chaperone;
174+
if (chaperone != null)
175+
chaperone.ResetZeroPose(SteamVR.settings.trackingSpace);
176176
}
177177
}
178178
else

Assets/SteamVR/readme.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SteamVR Unity Plugin - v2.6.0b2 (sdk 1.12.5)
1+
# SteamVR Unity Plugin - v2.6.0b3 (sdk 1.13.10)
22

33
Copyright (c) Valve Corporation, All rights reserved.
44

@@ -35,8 +35,14 @@ Input and Steam:
3535

3636
If you publish your game to steam you can let users change their input bindings while the game is not running by setting the location of your action manifest. On the steamworks partner site go to the Application settings, and the Virtual Reality Section. At the bottom you'll see a radio button to designate your title as a SteamVR Input application. You then can set the location of your action manifest. In older versions of the plugin this was next to the executable. In versions 2.3.3 and above this is in [GameName]_Data/StreamingAssets/SteamVR/actions.json.
3737

38+
39+
Changes for 2.6.0b3
40+
* Updated sdk header to 1.13.10
41+
42+
* Moved System.ResetSeatedPosition to Chaperone.ResetZeroPosition(trackingUniverse)
3843

3944
Changes for 2.6.0b2
45+
4046
* Updated sdk header to 1.12.5
4147

4248
* Added basic Universal Rendering Pipeline support

0 commit comments

Comments
 (0)