cancel
Showing results for 
Search instead for 
Did you mean: 

Unity game frequenly launches to black screen

dalanchoo
Level 2

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

sSvvSs
Level 3

I'm also having such issues, for me it's happens only on first starts, when you started unity before AppLink initialization. In 100% cases I'm able to fix it by reloading unity, I guess that it's happens when unity started without connected device.

 

Please note that in my case I'm restarting unity only after first launch with black screen. After reloading unity detect device and everything works fine.

View solution in original post

4 REPLIES 4

dalanchoo
Level 2

Does anybody have any insight? This issue is seriously hampering me.

sSvvSs
Level 3

I'm also having such issues, for me it's happens only on first starts, when you started unity before AppLink initialization. In 100% cases I'm able to fix it by reloading unity, I guess that it's happens when unity started without connected device.

 

Please note that in my case I'm restarting unity only after first launch with black screen. After reloading unity detect device and everything works fine.

View solution in original post

DarkTable
Level 5

I've had occasional issues with Quest Link and the Unity Editor too. What I've been doing is make sure the headset is on, Quest Link is active, and I'm seeing the PC Oculus Home before pressing play in Unity.

 

I've noticed I have the most issues if I press play in Unity and then put the headset on. Especially if pressing play in Unity is what launches the PC Oculus app.

I think that the issue might be related to the order of doing these things. I have been diligent to make sure I have Oculus link established first and then I press play in Unity. So far this seems to work.

 

I did have the black screen issue happen once, after my quest appeared to get disconnected. I heard the USB disconnection sound and then I loaded into a black screen. Restarting unity and making sure that Oculus link was enabled before pressing play in Unity fixed that issue.

 

Right now things seem to be good. I think I was in a bad state where my Quest was always disconnecting from my PC every time I tried to load. I am not currently suffering this, so things seem more workable now.

 

John