You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/Using-XR-Interaction-Toolkit.md
+78-1Lines changed: 78 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
# Using XR Interaction Toolkit
2
2
3
3
A quick guide on using XR Interaction Toolkit with WebXR Export.
4
-
For a guide on how to build and set a project, basic settings and WebGLTemplates, check the Getting Started guide.
5
4
6
5
## Sample Scene
7
6
@@ -21,3 +20,81 @@ The support for XR Interaction Toolkit was added using Unity 2022.3.10f1 and tes
21
20
The support was built in a way that it'll be possible to use the OpenXR package in editor mode. For that the OpenXR package should be set up in the XR Plug-in Management window.
22
21
Notice that the `CameraMain` is using the old `Tracked Pose Driver` instead of the one of the Input System package, due to a bug. It will create issues when using "XR Interaction Toolkit - XR Device Simulator". On those cases, you can add the new component and disable the old one when in editor.
23
22
Notice that the XR Device Simulator won't work if OpenXR is enabled and the Interaction Profiles list in the OpenXR settings is not empty.
23
+
24
+
## Getting Started - XR Interaction Toolkit Sample
25
+
26
+
Create a new Unity Project (2022.3.10f1 and up). Switch platform to WebGL.
27
+
28
+
Import WebXR Export and WebXR Interactions packages from OpenUPM.
If some dependencies are missing, the `Project Validation` will open, click `Fix` on every issue and wait for it to be fixed before clicking on the next `Fix`.
After `WebGLTemplates` are in the `Assets` folder, Open the `XR Plug-in Management` tab in the `Project Settings` window and select the `WebXR Export` plug-in provider.
Set `Background Behavior` to `Ignore Focus` in the `Input System Package` settings in the `Project Settings` window. That would make sure that the controllers tracking won't be lost when the browser tab loses focus.
77
+
78
+

79
+
80
+
If using the `WebXR Input Profiles Loader`, locate the `GLTFShaderVariants`.
In `Project Settings > Player > Resolution and Presentation`, select `WebXR2020` or `WebXRFullView2020` as the `WebGL Template`. (The WebXR templates with no year number are for older versions)
89
+
90
+

91
+
92
+
Now you can build the project.
93
+
94
+

95
+
96
+
WebXR requires a secure context (HTTPS server or localhost URL). Make sure to build the project from `Build Settings > Build`. Unity's `Build And Run` server uses HTTP. Run the build on your own HTTPS server.
0 commit comments