Unity game frequenly launches to black screen
Hi,
I am experiencing an intermittent problem with an Oculus Quest game that I am developing. When I encounter this problem, I am unable to do any development in the editor. I am using Oculus Link to quickly iterate. Essentially, when I launch the game, sometimes my game will only load into a black screen instead of showing my level.
Previously, this problem would happen about 30% of the time, and I would somehow be able to work around the problem by rebooting my Quest, restarting Unity, unplugging and replugging in my Quest, rebooting my computer, etc. Usually, I can eventually get around this issue, but lately, it is happening more and more and I am having a much harder time getting past this issue. Sometimes I will try for 30 minutes and not be able to get past this.
I'm currently using Unity 2021.1.5f1, though I have been encountering this issue with the last several versions of Unity, going back probably about a year. Initially, I was using a Quest 1. I just purchased a Quest 2 which came with a different link cable. However, the problem happens with my Quest 1 and Quest 2, using the original cable or the new cable. Also, I have the same problem when using Air Link with my new Quest 2.
On my PC, I'm currently running the Oculus App version 28.0.0.222.469 though I'm sure it has happened on previous versions as well, as this app is set to auto-update.
When I use the Oculus Link cable, I hear the USB connect and disconnect sound happen several times when I try to run in the editor. These are the same sounds I hear when I plugin or unplug the link cable. When I run with Air Link, I don't hear these USB connection and disconnection sounds.
Any ideas on how I can fix this issue?
I have included the log files for a successful and unsuccessful run. I have also included a video for a successful and unsuccessful run. (My level is all blue and contains nothing. I have to click on the Oculus button to bring up a dialog box that allows me to select options before I generate the world.)
I have also encountered this issue when loading other scenes, not just my game. I'm including an example of this happening with the DistanceGrab example scene.
When this issue happens, I see in the Quest that it is launching a Unity App. However, it will launch to an all-black screen.
This issue is severely affecting my ability to develop. Any help is greatly appreciated.
Thanks in advance
John Lawrie
The first link is a link to the DistanceGrab failing
https://drive.google.com/file/d/148D4RyTrxWvkaiuApHGGraDoGlR8p6oE/view?usp=sharing
This second link is a link to when my level fails to display
https://drive.google.com/file/d/1CNYx9clV_Sr3nzVgnhipSB3s6o7NeykE/view?usp=sharing
This third link is a link to when my level does manage to load
https://drive.google.com/file/d/1XMIBgtFSXxc12TWp0W-CcxIujOsDMUyW/view?usp=sharing
This is the log from when my level failed to load.
Failed to set DeveloperMode on Start.
UnityEngine.Debug:LogError (object)
Unity.XR.Oculus.Development:OverrideDeveloperModeStart () (at Library/PackageCache/com.unity.xr.oculus@1.9.0/Runtime/OculusDevelopment.cs:39)
Unity.XR.Oculus.OculusLoader:Start () (at Library/PackageCache/com.unity.xr.oculus@1.9.0/Runtime/OculusLoader.cs:182)
UnityEngine.XR.Management.XRGeneralSettings:AttemptStartXRSDKOnBeforeSplashScreen () (at Library/PackageCache/com.unity.xr.management@4.0.1/Runtime/XRGeneralSettings.cs:158)
Unity v2021.1.5f1, Oculus Utilities v1.51.0, OVRPlugin v1.51.1, SDK v1.60.0.
UnityEngine.Debug:Log (object)
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1161)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
SystemHeadset Oculus_Link_Quest
UnityEngine.Debug:Log (object)
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1166)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
TcpListener started. Local endpoint: 0.0.0.0:32419
UnityEngine.Debug:LogFormat (string,object[])
OVRNetwork/OVRNetworkTcpServer:StartListening (int) (at Assets/Oculus/VR/Scripts/Util/OVRNetwork.cs:99)
OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer:OnEnable () (at Assets/Oculus/VR/Scripts/Util/OVRSystemPerfMetrics.cs:190)
UnityEngine.GameObject:AddComponent<OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer> ()
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1279)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
[OVRNetworkTcpServer] Start Listening on port 32419
UnityEngine.Debug:LogFormat (string,object[])
OVRNetwork/OVRNetworkTcpServer:StartListening (int) (at Assets/Oculus/VR/Scripts/Util/OVRNetwork.cs:111)
OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer:OnEnable () (at Assets/Oculus/VR/Scripts/Util/OVRSystemPerfMetrics.cs:190)
UnityEngine.GameObject:AddComponent<OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer> ()
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1279)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
[OVRManager] OnApplicationPause(false)
[OVRManager] OnApplicationFocus(true)
OVRControllerHelp: Active controller type: QuestAndRiftS for product Quest
OVRControllerHelp: Active controller type: QuestAndRiftS for product Quest
The current MSAA level is 0, but the recommended MSAA level is 4. Switching to the recommended level.
[OVRManager] HMDAcquired event
--------------------
[OVRManager] VrFocusAcquired event
[OVRManager] InputFocusLost event
[OVRManager] VrFocusLost event
[OVRManager] OnApplicationFocus(false)
This is the log from a time when my level loaded successfully.
Failed to set DeveloperMode on Start.
UnityEngine.Debug:LogError (object)
Unity.XR.Oculus.Development:OverrideDeveloperModeStart () (at Library/PackageCache/com.unity.xr.oculus@1.9.0/Runtime/OculusDevelopment.cs:39)
Unity.XR.Oculus.OculusLoader:Start () (at Library/PackageCache/com.unity.xr.oculus@1.9.0/Runtime/OculusLoader.cs:182)
UnityEngine.XR.Management.XRGeneralSettings:AttemptStartXRSDKOnBeforeSplashScreen () (at Library/PackageCache/com.unity.xr.management@4.0.1/Runtime/XRGeneralSettings.cs:158)
Unity v2021.1.5f1, Oculus Utilities v1.51.0, OVRPlugin v1.51.1, SDK v1.60.0.
UnityEngine.Debug:Log (object)
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1161)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
SystemHeadset Oculus_Link_Quest
UnityEngine.Debug:Log (object)
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1166)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
TcpListener started. Local endpoint: 0.0.0.0:32419
UnityEngine.Debug:LogFormat (string,object[])
OVRNetwork/OVRNetworkTcpServer:StartListening (int) (at Assets/Oculus/VR/Scripts/Util/OVRNetwork.cs:99)
OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer:OnEnable () (at Assets/Oculus/VR/Scripts/Util/OVRSystemPerfMetrics.cs:190)
UnityEngine.GameObject:AddComponent<OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer> ()
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1279)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
[OVRNetworkTcpServer] Start Listening on port 32419
UnityEngine.Debug:LogFormat (string,object[])
OVRNetwork/OVRNetworkTcpServer:StartListening (int) (at Assets/Oculus/VR/Scripts/Util/OVRNetwork.cs:111)
OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer:OnEnable () (at Assets/Oculus/VR/Scripts/Util/OVRSystemPerfMetrics.cs:190)
UnityEngine.GameObject:AddComponent<OVRSystemPerfMetrics/OVRSystemPerfMetricsTcpServer> ()
OVRManager:InitOVRManager () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1279)
OVRManager:Awake () (at Assets/Oculus/VR/Scripts/OVRManager.cs:1313)
[OVRManager] OnApplicationPause(false)
[OVRManager] OnApplicationFocus(true)
OVRControllerHelp: Active controller type: QuestAndRiftS for product Quest
OVRControllerHelp: Active controller type: QuestAndRiftS for product Quest
The current MSAA level is 0, but the recommended MSAA level is 4. Switching to the recommended level.
[OVRManager] HMDAcquired event
--------------------
[OVRManager] HMDMounted event
[OVRManager] VrFocusAcquired event
[OVRManager] InputFocusLost event
[OVRManager] InputFocusAcquired event
[OVRManager] TrackingAcquired event
Canvas does not have an event camera attached. Attaching OVRCameraRig.centerEyeAnchor as default.
[Singleton] Using instance already created: ConquestUIManager
Canvas does not have an event camera attached. Attaching OVRCameraRig.centerEyeAnchor as default.
[Singleton] Using instance already created: FPSCalculator
[OVRManager] HMDUnmounted event
[OVRManager] VrFocusLost event
[OVRManager] TrackingLost event
[OVRManager] TrackingAcquired event
[Singleton] Using instance already created: Cursor
[Singleton] Using instance already created: UIScaler
