How to use WebXR with Unity - January 2024 Edition

  Переглядів 4,107

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

КОМЕНТАРІ: 38
@De-Panther
@De-Panther 3 місяці тому
Forgot to mention, build needs to run on a secured context - URL localhost or HTTPS server
@ASDESIGN_RT3D
@ASDESIGN_RT3D 3 місяці тому
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 3 місяці тому
@@ASDESIGN_RT3D use secured context. HTTPS server. you can also follow the Using-XR-Interaction-Toolkit doc in the repository.
@ASDESIGN_RT3D
@ASDESIGN_RT3D 3 місяці тому
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 3 місяці тому
@@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 3 місяці тому
Will do@@De-Panther
@mudsp1ash
@mudsp1ash 3 місяці тому
you're a hero my man
@vrfordev
@vrfordev 3 місяці тому
Thanks you!)
@jakeaquilina505
@jakeaquilina505 2 місяці тому
can you please explain how to use AR with mobile devices?
@ziadmahmoud1999
@ziadmahmoud1999 9 годин тому
it doesnt work on headset because of the poly fill liberary is missed in the device
@salziert6102
@salziert6102 Місяць тому
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 2 місяці тому
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 2 місяці тому
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.
@imagoFX
@imagoFX 26 днів тому
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 26 днів тому
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.
@caiocabral7355
@caiocabral7355 3 місяці тому
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 3 місяці тому
Forgot to mention, build needs to run on a secured context - URL localhost or HTTPS serve
@gtk2k
@gtk2k 2 місяці тому
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 2 місяці тому
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 2 місяці тому
@@De-Panther Thank you! I try it.
@katariya608
@katariya608 3 місяці тому
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 3 місяці тому
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.
@Ant_-yg4pn
@Ant_-yg4pn 3 місяці тому
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 3 місяці тому
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 3 місяці тому
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 3 місяці тому
@@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
@m.shahrulnizam4655
@m.shahrulnizam4655 Місяць тому
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 Місяць тому
As explained in this video, you need to use spectator camera for that. It's an extra view.
@m.shahrulnizam4655
@m.shahrulnizam4655 Місяць тому
@@De-Panther Okay thanks, does this support in BRP?
28 днів тому
Hey Oren, is it possible to test from unity?
@De-Panther
@De-Panther 28 днів тому
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.
@atqamz
@atqamz 2 місяці тому
how to deploy and use an AR instead VR?
@De-Panther
@De-Panther 2 місяці тому
The samples already works on AR mode. Just try it on a supported device
@atqamz
@atqamz 2 місяці тому
@@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 3 місяці тому
Is this compatible with URP ?
@De-Panther
@De-Panther 2 місяці тому
As mentioned in the video, currently URP is required. Working on adding back support for BiRP
@StarCrew91
@StarCrew91 2 місяці тому
@@De-Panther That's insane ! Thank you for this !
@m.shahrulnizam4655
@m.shahrulnizam4655 Місяць тому
@@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.
Переглядів 18 тис.
WebXR Export for Unity - 2020-11-01 Update
13:55
Oren De-Panther
Переглядів 12 тис.
ШАХТАР - ДИНАМО. КОМЕНТУВАННЯ. УПЛ. 28 ТУР
4:04:31
😨Новая Война в GTA 5 Online #shorts
00:40
King Dm
Переглядів 1,7 млн
😱СНЯЛ СУПЕР КОТА НА КАМЕРУ⁉
00:37
OMG DEN
Переглядів 1,8 млн
ProBuilder for grey-boxing in Unity | Tutorial
18:45
Unity
Переглядів 24 тис.
Mobile Augmented Reality: Web vs App
5:55
WeAR Studio
Переглядів 36 тис.
VR Gaze Interaction in Unity
21:43
Tomaz Saraiva
Переглядів 8 тис.
FREE WEBXR Games To Play in Quest 3 Browser!
10:16
DiscoVR
Переглядів 6 тис.
Setup Unity for VR Support in 2023
14:29
Ryan Murray
Переглядів 7 тис.
VR Cardboard SELECCIÓN con la mirada - SIN CONTROLES
17:26
Unity Adventure
Переглядів 6 тис.
VR Optimization and Performance Tips for Unity
14:22
Andrew
Переглядів 48 тис.
Лучший Смартфон До 149 Баксов!!!??? itel s24
20:25
РасПаковка ДваПаковка
Переглядів 54 тис.
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Переглядів 5 млн
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Переглядів 2,1 млн
Samsung UE40D5520RU перезагружается, замена nand памяти
0:46
Слава 100пудово!
Переглядів 3,7 млн