Ed Biden
Ed Biden

Reputation: 111

Unity iOS screen goes black for several seconds on startup

I've built a fairly simple game (based on Sudoku, but with some animations) in Unity. When I load the game onto a device (iOS or Android, but I've only included screenshot from Xcode here), the game shows the Unity splash screen, then a black screen for perhaps 5 seconds, then shows the opening game animations.

The period with the black screen is long enough that lots of people think the game has crashed. Does anyone know what is causing this and how to make the game load faster??

I've attached a screenshot from Xcode below. The point in the debug logs where the text switches from highlighted to unhighlighted is where the black screen appears. No lines are printed to the log during this time.

Xcode CPU usage / debug log

I can see there's a big spike in CPU usage right at the start, and the only thing that I can see that might cause this is the Unity Preload. Is this right? Does it mean that there's nothing I can do to speed this up?

Upvotes: 4

Views: 2563

Answers (1)

Ed Biden
Ed Biden

Reputation: 111

Ok, turns out that the problem was all the audio assets were set to load straight away, and as they were big, that slowed everything down. We changed the load type from "decompress on load" to "compressed in memory" and everything loaded super fast. Reducing the number of prefabs in the first scene also helped.

enter image description here

Upvotes: 5

Related Questions