Тёмный

How to use WebXR with Unity - January 2024 Edition 

Oren De-Panther
Подписаться 345
Просмотров 6 тыс.
50% 1

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

Наука

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@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 2 месяца назад
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 6 месяцев назад
Forgot to mention, build needs to run on a secured context - URL localhost or HTTPS server
@ASDESIGN_RT3D
@ASDESIGN_RT3D 6 месяцев назад
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 6 месяцев назад
@@ASDESIGN_RT3D use secured context. HTTPS server. you can also follow the Using-XR-Interaction-Toolkit doc in the repository.
@ASDESIGN_RT3D
@ASDESIGN_RT3D 6 месяцев назад
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 6 месяцев назад
@@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 6 месяцев назад
Will do@@De-Panther
@victorhugoka4378
@victorhugoka4378 20 дней назад
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.
@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?
@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
@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
@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.
@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.
@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.
@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.
@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
@ianfontesnicacio6666
@ianfontesnicacio6666 15 дней назад
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 15 дней назад
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.
@Ant_-yg4pn
@Ant_-yg4pn 6 месяцев назад
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 6 месяцев назад
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 6 месяцев назад
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 6 месяцев назад
@@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
@linhmaituan5158
@linhmaituan5158 2 месяца назад
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.
@dewakeadilan
@dewakeadilan День назад
iirc if you press the AR button on the template in the desert scene it will switch to AR. So why does this not working now? Did I miss something?
@De-Panther
@De-Panther День назад
It does work. If you have bugs to report, you can open a bug issue in the repo using the bugs template.
@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?
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.
@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
Далее
WebXR Made Easy with AI
7:24
Просмотров 7 тыс.
I tried coding my own graphics engine
4:23
Просмотров 193 тыс.
AR Over the Web Browser Using AR.js, A-Frame, & WebXR
49:32
Unity XR Hands + WebXR: How To
16:04
Просмотров 812
WebXR Advanced Interaction in Unity 3D
2:05
Просмотров 1,2 тыс.
Meta Connect 2022 | Build Great WebXR Experiences
19:33
How to Host Unity a Webgl Game on Github for Free
3:57
WebXR APIs and Examples
30:59
Просмотров 18 тыс.
WebXR Export for Unity - 2020-11-01 Update
13:55
Просмотров 13 тыс.
Aura 879dsp новинка и хит
0:48
Просмотров 175 тыс.
iPhone 16 - НЕ СТОИТ ПРОПУСКАТЬ
4:50