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.06k stars 111 forks source link

Web VR button is grey on Oculus Quest, while it works on Cardboard #63

Closed TheBricktop closed 4 years ago

TheBricktop commented 4 years ago

I've Used webXRfull template for my application, works flawlessly in flat mode in almost all browsers. There is one issue tho - i cant enable the VR button (always gray even when the loading bar is full and the app actually starts). Weirdly the it works on Carboard without any issues (both android and ios).

De-Panther commented 4 years ago

Is there a URL to test? I didn't get to build the WebXRFull template for a while now. And as you wrote, it enables the VR button on the Cardboard.

Are you using HTTP or HTTPS? If you are using HTTP, it might use the Polyfill, and actually use the old WebVR API.

TheBricktop commented 4 years ago

It might be the reason for problems, we have we are checking the certification at the moment. The adress is here http://instytutxr.tk/SolarisWebXR/ .

De-Panther commented 4 years ago

So the issue was the non-secure connection. I see that it's refer to HTTPS now, and both AR and VR modes worked on my device. Cool demo.

egrigori commented 2 years ago

Hi,

[Update] See this issue: No active WebXR.WebXRSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.

This is why the XR is not working fot me. Will create a new thread/check for answers.


I see this issue is closed, but I'm having a similar issue. I'm using the plugin with Unity 2020.3.2f1 and uploaded the .zip file to itch.io: https://eco-editor.itch.io/webxr-test-dec15

I've exported with WebGL templates: Default and WebXR2020 and both resulted in Grey AR/VR buttons.

also tried with Unity 2019.4.31 with WebXR template and WebXR default template.

Tried playing on the Quest - same result.

Finally went to the ,index file and chaged this code: enterARButton.addEventListener('click', function (event) { unityInstance.Module.WebXR.toggleAR(); }, true); enterVRButton.addEventListener('click', function (event) { unityInstance.Module.WebXR.toggleVR(); }, true); </script> </body> </html>

I understand this is an http/https related issue, what type of security itch.io has?

Thank you

tanjunior commented 1 year ago

I am having the same error when running in editor.

unity 2019.3.15f1

No active WebXR.WebXRSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
UnityEngine.Debug:LogWarningFormat(String, Object[])
WebXR.SubsystemLifecycleManager`2:GetActiveSubsystemInstance() (at Library/PackageCache/com.de-panther.webxr@69346515f8/Runtime/XRPlugin/XRSystemLifecycleManager.cs:57)
WebXR.SubsystemLifecycleManager`2:EnsureSubsystem() (at Library/PackageCache/com.de-panther.webxr@69346515f8/Runtime/XRPlugin/XRSystemLifecycleManager.cs:37)
WebXR.SubsystemLifecycleManager`2:Awake() (at Library/PackageCache/com.de-panther.webxr@69346515f8/Runtime/XRPlugin/XRSystemLifecycleManager.cs:26)
WebXR.WebXRManager:Awake() (at Library/PackageCache/com.de-panther.webxr@69346515f8/Runtime/Scripts/WebXRManager.cs:122)

I looked in XRSystemLifecycleManager.cs and loader is returning null

protected TSubsystem GetActiveSubsystemInstance()
        {
            TSubsystem activeSubsystem = null;

            // Query the currently active loader for the created subsystem, if one exists.
            if (XRGeneralSettings.Instance != null && XRGeneralSettings.Instance.Manager != null)
            {
                XRLoader loader = XRGeneralSettings.Instance.Manager.activeLoader;
                if (loader != null)
                    activeSubsystem = loader.GetLoadedSubsystem<TSubsystem>();
            }

            if (activeSubsystem == null)
                Debug.LogWarningFormat($"No active {typeof(TSubsystem).FullName} is available. Please ensure that a " +
                                       "valid loader configuration exists in the XR project settings.");

            return activeSubsystem;
        }