Massive lag when changing scenes on Android.

I am making an endless game in unity 2d. The screen layout resembles flappy bird, and as such has obstacles, your score, you, and your controls. The main menu is part of the same unity scene and appears when the app starts and when you die. You can buy characters, which are just sprite changes in the shop. The shop is in a separate scene. The scene change was just fine, but after adding music to both scenes, and more costumes, it takes 8 seconds to go from menu to shop. 12 seconds to go back to menu. Switching to the credits scene is instantaneous, but going back takes 6 seconds. This doesn’t seem like much, but I’m sure users will find it unacceptable. How do I fix this? BTW, I posted this to the forums earlier without realizing there was an answers section.

Ah, ok. There are two problems. That is a really long file to load into memory on android. You should consider cutting it way down and looping it. maybe to 30 seconds or less? Also, you can get a free audio editor and lower the quality to shrink the size. You likely won’t even notice the difference on a mobile device speaker. If you don’t want to cut the music up, definitely make the main page a separate scene. Loading 6 - 10 minutes of music is going to kill your load time.

Also, Canvas is bad news for Mobile. I’m not sure why, but they mention it a couple of times during this live training on Mobile Development. That is probably way more work to change though. You should start by cutting down your music and/or splitting your game to two scenes and see how far that gets you. You may not need to change out the canvas at all.

I decided to combine them all into one scene. That way, it’s not having to load a scene at all. Just set the active status of a canvas. It worked well in the editor, so I’m hoping it works. Updating the app on my phone now.