How to use WebXR with Unity - January 2024 Edition

  Рет қаралды 5,936

Oren De-Panther

Oren De-Panther

Күн бұрын

Getting started guide for WebXR Export and XR Interaction Toolkit in Unity, January 2024 Edition.
Base project uses:
Unity OpenXR package, Unity XR Hands package, XR Interaction Toolkit package and URP.
The base scene is from XR Interaction Toolkit Starter Assets sample.
Links from the video:
WebXR Export - github.com/De-Panther/unity-w...
Sponsor WebXR Export - github.com/sponsors/De-Panther
WebXR Input Profiles Loader - github.com/De-Panther/webxr-i...
glTFast project setup - docs.unity3d.com/Packages/com...
Chapters:
0:00 Intro
0:45 Base project
1:39 Importing WebXR Export
4:20 Configuring WebXR Export
8:05 1st build
10:05 Make it work
11:54 2nd build - Minimal working project
13:23 Add good stuff
16:16 3rd build - Good stuff and regression
17:52 Fix regression
19:06 Add WebXR Input Profiles
21:40 4th build - It works!
23:30 Add Spectator Mode and more
26:40 5th build - Done!
#WebXR #Unity #WebGL #VirtualReality #AugmentedReality #SpatialComputing

Пікірлер: 50
@De-Panther
@De-Panther 2 ай бұрын
Unity 6 has issues on web with URP and XR Display Submodule. Use the BiRP samples instead and disable the XR Display Submodule in the WebXR Settings.
@abadlibadreddine1960
@abadlibadreddine1960 Ай бұрын
Thank you for helping me make my school project i really appreciate your help man
@mudsp1ash
@mudsp1ash 5 ай бұрын
you're a hero my man
@vrfordev
@vrfordev 5 ай бұрын
Thanks you!)
@De-Panther
@De-Panther 5 ай бұрын
Forgot to mention, build needs to run on a secured context - URL localhost or HTTPS server
@ASDESIGN_RT3D
@ASDESIGN_RT3D 5 ай бұрын
Thanks for the video but despite following the setup the AR and VR buttons always greyed out? Is there anything I can do to fix this?
@De-Panther
@De-Panther 5 ай бұрын
@@ASDESIGN_RT3D use secured context. HTTPS server. you can also follow the Using-XR-Interaction-Toolkit doc in the repository.
@ASDESIGN_RT3D
@ASDESIGN_RT3D 5 ай бұрын
Thanks but I’m doing this! And I’ve followed the documentation. I am using 2022.3.12, does it only work in version 2022.3.10?@@De-Panther
@De-Panther
@De-Panther 5 ай бұрын
@@ASDESIGN_RT3D it should work in all 2022.3, also tested it today with 2022.3.16. You are welcome to join the WebXR Discord and ask in the Unity channel there. Can't share links in comments here
@ASDESIGN_RT3D
@ASDESIGN_RT3D 5 ай бұрын
Will do@@De-Panther
@jakeaquilina505
@jakeaquilina505 4 ай бұрын
can you please explain how to use AR with mobile devices?
@salziert
@salziert 4 ай бұрын
Can I build a native app with capacitor and put my Unity game in their ? And then for example have a leaderboard with js which communicates with the Unity game that got embedded?
@zoltar3172
@zoltar3172 5 ай бұрын
Thank you for all the hard work to make this happen! Will this also run with WebGPU that Unity has in the beta with 2023.3 and will release in April? Because WebGPU will give a lot of extra performance then WebGL
@De-Panther
@De-Panther 5 ай бұрын
There's no general support for WebXR with WebGPU in browsers yet. Once there'll be such support, we'll see how and if it can work with Unity.
@victorhugoka4378
@victorhugoka4378 12 күн бұрын
I love it. But after i enter in vr mode in browser of quest3 i don't know how i back to navegator, finishing the vr mode.
@how-to-make-a-game
@how-to-make-a-game 2 ай бұрын
it doesnt work on headset because of the poly fill liberary is missed in the device
@caiocabral7355
@caiocabral7355 5 ай бұрын
When I test with Android, dont sync the rotation of the device with the camera... When I solve then? In you live demo works perfectly, but in my build, It can get Google AR/XR correctly :(
@caiocabral7355
@caiocabral7355 5 ай бұрын
Forgot to mention, build needs to run on a secured context - URL localhost or HTTPS serve
@Ant_-yg4pn
@Ant_-yg4pn 5 ай бұрын
Would you have to change anything with regard to the materials being used or the type of object. Doesn't web use gltf? Is this converted automatically upon export? Thanks so much for the video! :)
@De-Panther
@De-Panther 5 ай бұрын
If you see pink materials in your project, use URP and convert Built-in RP materials to URP. Web doesn't use glTF by default. The only glTF models in this tutorial are the headset controllers
@Ant_-yg4pn
@Ant_-yg4pn 5 ай бұрын
Hey thanks! @@De-Panther. I love your project! Do you know if MRTK also works with this? Apologies for the abundance of questions
@De-Panther
@De-Panther 5 ай бұрын
@@Ant_-yg4pn Should work, I didn't test. I guess you'll have to do some adaptations. And I'm not sure about the performance. But you can try and tell if it worked
@gtk2k
@gtk2k 4 ай бұрын
I want to implement a stereoscopic video player using WebXR Export. 1. Is it possible to set the GameObject to be displayed only in the left eye or only in the right eye, like mesh.layers.set(1) / mesh.layers.set(2) in Three.js? or 2. Is it possible to use unity_stereoEyeIndex in Unity's Shader to render a different texture for each eye?
@De-Panther
@De-Panther 4 ай бұрын
When using the XR SDK display module, you should be able to use Unity's solutions like unity_stereoEyeIndex. But in the latest WebXR Export there's an option to disable XR SDK display, and use list of cameras instead. try the Built-in RP samples that were added
@gtk2k
@gtk2k 4 ай бұрын
@@De-Panther Thank you! I try it.
@linhmaituan5158
@linhmaituan5158 Ай бұрын
Can you please create a tutorial to create a marker-based AR-app with Unity using WebXR export and how to test it with the app running on localhost?
@De-Panther
@De-Panther Ай бұрын
WebXR doesn't support marker tracking. There are some JavaScript based AR libs for web that support markers (like AR.JS), but the WebXR Export packages doesn't support them.
@EliasIoannou
@EliasIoannou 2 ай бұрын
It works for me when i use Air link to connect to the place i hosted it and click VR from there. However when i go through the meta quest browser in VR to test it i just see the number and a weird empty skybox with no lighting like its a default unity scene and u deleted the lighting. This tells me that none of the textures load. Any idea why? Please help :( I use gzip and decompression fallback idk if that plays a role.
@De-Panther
@De-Panther 2 ай бұрын
I suggest to open an issue using the bug template in the WebXR Export repo. Thanks
@ianfontesnicacio6666
@ianfontesnicacio6666 6 күн бұрын
Hello, i use the asset HurricaneVR to be my player, but i really dont understand why my buttons dont work. Can you help me? The build works fine, but no hand
@De-Panther
@De-Panther 6 күн бұрын
I don't know this asset. It seems to be paid asset, I don't know how the interactions in the asset works. You can ask the creator of the asset for support.
@katariya608
@katariya608 5 ай бұрын
as a beginner on unity im still abit confused on the AR part of the WebXR I have used the xr toolkit and ar foundation before but Im not sure how to integrate it with webxr
@De-Panther
@De-Panther 5 ай бұрын
The XR Interaction Toolkit stuff works with WebXR Export, as those are Interactions. The AR Foundation is not implemented yet. Currently WebXR Export supports rendering in AR, and Hit-Test.
@imagoFX
@imagoFX 3 ай бұрын
Thanks for the video and the awesome exporter. For me, it work on chrome on PC but not on the oculus browser - the loader under the unity logo gets stuck on 90%. Any idea why? תודה :)
@imagoFX
@imagoFX 3 ай бұрын
Found the problem - In player settings -> publishing settings disabling compression settings solves it. It was mentioned in the video but I skipped it for some reason.
3 ай бұрын
Hey Oren, is it possible to test from unity?
@De-Panther
@De-Panther 3 ай бұрын
WebXR works only on browser, but you can use the WebXR Export provider package in the same project with OpenXR provider, and test the interactions/locomotion and other mechanics in the editor using the OpenXR runtime.
@m.shahrulnizam4655
@m.shahrulnizam4655 3 ай бұрын
Hi, i have question, why when i play VR in chrome using HTC Vive headset, the scene only display in HMD but in chrome it is blank, how to make it display to both screen?
@De-Panther
@De-Panther 3 ай бұрын
As explained in this video, you need to use spectator camera for that. It's an extra view.
@m.shahrulnizam4655
@m.shahrulnizam4655 3 ай бұрын
@@De-Panther Okay thanks, does this support in BRP?
@atqamz
@atqamz 4 ай бұрын
how to deploy and use an AR instead VR?
@De-Panther
@De-Panther 4 ай бұрын
The samples already works on AR mode. Just try it on a supported device
@atqamz
@atqamz 4 ай бұрын
@@De-Panther I see, what I want to implement is image tracking which is unsupported yet, that's why it won't work.
@StarCrew91
@StarCrew91 5 ай бұрын
Is this compatible with URP ?
@De-Panther
@De-Panther 5 ай бұрын
As mentioned in the video, currently URP is required. Working on adding back support for BiRP
@StarCrew91
@StarCrew91 5 ай бұрын
@@De-Panther That's insane ! Thank you for this !
@m.shahrulnizam4655
@m.shahrulnizam4655 3 ай бұрын
@@De-Panther Hi, can i use on 3D Core template, just in case you have done the back support..thanks
AR Over the Web Browser Using AR.js, A-Frame, & WebXR
49:32
CrossComm, Inc.
Рет қаралды 19 М.
WebXR Export for Unity - 2020-11-01 Update
13:55
Oren De-Panther
Рет қаралды 13 М.
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 100 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 44 МЛН
Happy 4th of July 😂
00:12
Pink Shirt Girl
Рет қаралды 61 МЛН
Unity XR Hands + WebXR: How To
16:04
Oren De-Panther
Рет қаралды 790
WebXR Made Easy with AI
7:24
CJ Gammon
Рет қаралды 7 М.
WebXR Advanced Interaction in Unity 3D
2:05
MrJocyf
Рет қаралды 1,2 М.
The New XR Interaction Toolkit Example Project
12:09
Valem Tutorials
Рет қаралды 57 М.
7 Ways to Optimize your Unity Project with URP
11:18
Unity
Рет қаралды 203 М.
WebXR APIs and Examples
30:59
WebXR
Рет қаралды 18 М.
Creating your first animated AI Character! [AI #01]
22:11
TheKiwiCoder
Рет қаралды 101 М.
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 675 М.
Как слушать музыку с помощью чека?
0:36
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 1,8 МЛН