Skip to content

Commit 533940d

Browse files
committed
2.6.0b2 (sdk 1.12.5) - Basic URP support, Unity XR fixes
1 parent b5b4249 commit 533940d

File tree

88 files changed

+45733
-39008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+45733
-39008
lines changed

Assets/SteamVR/Editor/SteamVR_AutoEnableVR.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static SteamVR_AutoEnableVR()
2222

2323
protected const string openVRString = "OpenVR";
2424
protected const string openVRPackageString = "com.unity.xr.openvr.standalone";
25-
protected const string valveOpenVRPackageString = "com.valve.openvr";
25+
protected const string valveOpenVRPackageString = "com.valvesoftware.unity.openvr";
2626
protected const string valveOpenVRGitURL = "https://github.com/ValveSoftware/steamvr_unity_plugin.git#UnityXRPlugin";
2727

2828
#if UNITY_2018_2_OR_NEWER

Assets/SteamVR/Editor/SteamVR_Editor.asmdef

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "SteamVR_Editor",
33
"references": [
4-
"SteamVR"
4+
"SteamVR",
5+
"Unity.XR.OpenVR"
56
],
67
"includePlatforms": [
78
"Editor"
@@ -14,7 +15,7 @@
1415
"defineConstraints": [],
1516
"versionDefines": [
1617
{
17-
"name": "com.valve.openvr",
18+
"name": "com.valvesoftware.unity.openvr",
1819
"expression": "",
1920
"define": "OPENVR_XR_API"
2021
},
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using UnityEngine;
2+
using System.Collections;
3+
4+
namespace Valve.VR
5+
{
6+
public class SteamVR_CameraHelper : MonoBehaviour
7+
{
8+
void Start()
9+
{
10+
#if OPENVR_XR_API && UNITY_LEGACY_INPUT_HELPERS
11+
if (this.gameObject.GetComponent<UnityEngine.SpatialTracking.TrackedPoseDriver>() == null)
12+
{
13+
this.gameObject.AddComponent<UnityEngine.SpatialTracking.TrackedPoseDriver>();
14+
}
15+
#endif
16+
}
17+
}
18+
}

Assets/SteamVR/Extras/SteamVR_CameraHelper.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "SteamVR_Input_Editor",
33
"references": [
4-
"SteamVR"
4+
"SteamVR",
5+
"Unity.XR.OpenVR"
56
],
6-
"optionalUnityReferences": [],
77
"includePlatforms": [
88
"Editor"
99
],
@@ -12,5 +12,7 @@
1212
"overrideReferences": false,
1313
"precompiledReferences": [],
1414
"autoReferenced": true,
15-
"defineConstraints": []
15+
"defineConstraints": [],
16+
"versionDefines": [],
17+
"noEngineReferences": false
1618
}

Assets/SteamVR/Input/SteamVR_Action_In.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ public void ForceAddSourceToUpdateList(SteamVR_Input_Sources inputSource)
149149
{
150150
sourceMap.ForceAddSourceToUpdateList(inputSource);
151151
}
152+
153+
/// <summary>
154+
/// Returns a string for the type of controller that was being used the last time the action was triggered. Common types:
155+
/// vive_controller, oculus_touch, knuckles, vive_cosmos_controller, logitech_stylus
156+
/// </summary>
157+
/// <param name="inputSource">The device you would like to get data from. Any if the action is not device specific.</param>
158+
public string GetControllerType(SteamVR_Input_Sources inputSource)
159+
{
160+
return SteamVR.instance.GetStringProperty(ETrackedDeviceProperty.Prop_ControllerType_String, GetDeviceIndex(inputSource));
161+
}
152162
}
153163

154164
public class SteamVR_Action_In_Source_Map<SourceElement> : SteamVR_Action_Source_Map<SourceElement>

0 commit comments

Comments
 (0)