De-Panther / unity-webxr-export

Develop and export WebXR experiences using Unity WebGL
https://de-panther.github.io/unity-webxr-export/
Apache License 2.0
1.05k stars 110 forks source link

compatible with ios? VR icon/button is not working on Iphone safari. #157

Closed sakshi-oodles closed 3 years ago

sakshi-oodles commented 3 years ago

Hi De-Panther,

I am using this Unity Web XR exporter for one of my web browser demo so I have created a demo for android and iPhone web browsers. it's working well on android web browsers and also VR icon/button is working on android. But I am having an issue with iPhone Safari browsers when I click on the VR icon then the popup to buy/get cardboard viewer popup is there but in android, it splits in VR mode. Please suggest how it will work on iPhone browsers with cardboard devices. Thanks

De-Panther commented 3 years ago

There's no support for WebXR on iOS. The reason the VR button is enabled, is because of the WebXR Polyfill (a JS code that use other APIs to enable somewhat similar experience on capable browsers).

I never used cardboard with iOS, so I don't know how it should work.

You can find more info at https://github.com/immersive-web/webxr-polyfill

sakshi-oodles commented 3 years ago

Hi De-Panther, Thanks for your quick response.

I have one more question to ask: When I click on the VR icon/button on my oculus quest with sample Dessert scene it's working fine on oculus quest and cardboard. However, when I build the demo myself and host it, the VR button just shows a black screen. and I also tried to debug the issue so I am getting this issue with blank screen all-around 360 area but I can hear the sound of my video player. raven.min.js:2 Screen position out of view frustum (screen pos 1216.000000, 0.000000, 1000.000000) (Camera rect 0 0 1216 1344) (Filename: Line: 3489) Please help with this issue.

De-Panther commented 3 years ago

Well, it's out of the scope of this issue. And I have no idea what can cause this error with so little data (did you just try to build the demo after following the getting started guide, or did you make some changes... etc, etc...) Better ask this question on the WebXR Discord server https://discord.gg/Jt5tfaM there's a channel for Unity there.

De-Panther commented 3 years ago

Regarding iOS, I added an option to set the WebXR Polyfill config, so you can disable Cardboard polyfill, and it'll disable it on devices that use Cardboard using old APIs. https://github.com/De-Panther/unity-webxr-export/pull/162 I'll release a new WebXR Export package soon, but for now you can use the Git version.

sakshi-oodles commented 3 years ago

oh okay Great, so I am using Unity 2020.3 and I can see the WebXR Polyfill config option in the resolution and presentation section. and I want the VR button should work on iPhone and should split between left, a right camera like android is doing.

So please suggest to me what I should set in webxr polyfill config value? so that I can see VR view on iPhone web build.

De-Panther commented 3 years ago

@sakshi-oodles better ask that at the WebXR Polyfill repo or at the Cardboard VR Display repo. https://github.com/immersive-web/cardboard-vr-display/

I'm not familiar with Cardboard on iOS, and I don't have an iOS device for tests.

You can also try to ask at the WebXR discord server.

JulioNectar commented 7 months ago

Hi De-Panther, Thanks for your quick response.

I have one more question to ask: When I click on the VR icon/button on my oculus quest with sample Dessert scene it's working fine on oculus quest and cardboard. However, when I build the demo myself and host it, the VR button just shows a black screen. and I also tried to debug the issue so I am getting this issue with blank screen all-around 360 area but I can hear the sound of my video player. raven.min.js:2 Screen position out of view frustum (screen pos 1216.000000, 0.000000, 1000.000000) (Camera rect 0 0 1216 1344) (Filename: Line: 3489) Please help with this issue.

EDIT: Turns out that the Video was disabled by default in the pipeline settings. (And the video plugin that i mention bellow lower the fps)

Screenshot 2024-03-19 at 20 06 39

Original:

Hi!! About this question (video player not working, only audio) you can checkout this video plugin: https://assetstore.unity.com/packages/tools/integration/webgl-video-player-267985

its an easy replacement to the default Video Player. (Just add the "N Video Player" component in the default Video Player component).