Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.98k stars 1.11k forks source link

Please support webxr #1061

Closed Thaina closed 1 year ago

Thaina commented 1 year ago

Is your feature request related to a problem? Please describe. ARFoundation was cross platform for both android and ios also various hardware. Web is another platform that ARFoundation should also supported by utilizing webxr

Given that ios safari might not required to be engine for web browser of ios in near future, chrome and firefox start to port their engine into ios and that would enabled webxr. And unity was a great tools that allow us to develop things in web. WebXR should be embraced into AR Foundation

Describe the solution you'd like First, please integrate template like these into unity https://github.com/De-Panther/unity-webxr-export/

Second, please have plugins to wrap ARFoundation API over webxr API, include camera and other related system for XR

Describe alternatives you've considered No alternative is ideal. Currently I use the repo above which is not official and can only work with webgl platform. While the whole ARFoundation system should be cross to every platform possible to do XR and be the ultimate solution for XR

Additional context Please stop commenting and closing with the reason ARCore and WebXR are separate and distinct implementations. We know but it could and should be wrapped into the same pipeline of unity

yosun commented 1 year ago

How do you wrap WebXR into Unity? Unity WebGL only just barely works...

Thaina commented 1 year ago

@yosun As of it barely work it don't have any major problem. Unity WebGL itself is also wrap over whole webgl of the browser anyway. It even allow override any functionality by your jslib. I have even override Camera by copy Camera.jslib from unity editor folder

You can try with this repo https://github.com/De-Panther/unity-webxr-export/ and see it work normally in mobile webgl

andyb-unity commented 1 year ago

Hi @Thaina,

I agree that it would be great if Unity supported WebXR. What I can tell you is that you are correct that we currently do not support it, but there are third-party tools available such as the one you link here. Unity does not have immediate plans to implement WebXR support, but our product team is aware of the request, and we may do so in the future. For now that's all I can say. Hope that helps!

Thaina commented 1 year ago

@andyb-unity If it would in the uncertain future then I wish you would publish arfoundation package repo on github to allow us to extend it for supporting webxr with its API and pipeline. ArFoundation actually should be extensible to every hardware and every platform so it would be beneficial to have public repo that allow pull request

andyb-unity commented 1 year ago

AR Foundation is extensible already. If you would like to write your own WebXR provider plug-in, this is where you would start: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/manual/implement-a-provider.html

Thaina commented 1 year ago

AR Foundation is extensible already. If you would like to write your own WebXR provider plug-in, this is where you would start: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/manual/implement-a-provider.html

Is that extensible system let it possible to write extension to support webxr in arfoundation ?

andyb-unity commented 1 year ago

It would require a significant effort but yes it is possible.

Thaina commented 1 year ago

Thank you very much

ankur-unity commented 1 year ago

Closing this as it has been answered. Feel free to re-open it or open a new issue for follow-up questions.

vineetv-hexaware commented 11 months ago

You can use Needle Engine Integration for webGL builds I have been experimenting with it , works like hot knife in butter here is link : https://www.youtube.com/@needle-tools