- Home /
App launch takes long
Hello, i was trying to find something on the web but I don't know what to look for. I have created an Android and iOS App with Unity 5.4 and it works fine but on old devices it takes about 8 seconds to start the app.
I activated the unity loader but this only shows before the Unity Splash Screen shows up. After it disappears the screen is about 8 seconds black and then my first scene shows up. The scene itself is not complex at all, it just shows an image and thats it.
How can I add a loader between the splash screen and my first Scene?
Thank you very much for your help! Best regards!
First you should try to find out what's causing the lag. Build a development build with automatic profiler attachment and see what's happening there first.
Answer by N00MKRAD · Sep 06, 2017 at 07:48 AM
...make a loading screen.
Just make a scene with an image (or "loading" text) and make a script that loads your scene on Start().
Answer by SomehowLuke · Sep 12, 2017 at 07:03 PM
Thats what I did but its the loading screen before it starts any scenes.
Answer by Litleck · Sep 12, 2017 at 08:28 PM
Make a script that opens a loading screen in a start method.
Hello everyone, sorry for the very late response but there were so many other topics that I could not pay attention to that problem.
I am still having trouble with old devices. I found out that is has to do with the assest in the resources folder. Before unity starts their scene processes, it indexes all assets so they are accessable during runtime.
That is actually taking "very" long on old mobile devices and shows a black screen before the unity spash screen and loading screen comes in. Would be great to move the indexing process after it started loading, so the user knows there is something happening. Do you have any suggestions?
Thank you very much and best regards.
Answer by Plauine · Oct 27, 2020 at 10:05 AM
Hello there, quite an old topic but I had the same issue recently until I realised that the slow build was a development build. Once I built my project as a regular build the loading before splash screen was A LOT faster. Hope this will help!
Hi, thanks for your answer. $$anonymous$$eanwhile I have learned a lot about this and the problem were the assets in the resource folder. All assets are been loaded into memory and that takes a while, especially on old devices. :-) the new Addressable system helps a lot with that!
Yes dev-build is always slower.
Little hint: Be also aware of Debug.Log(). This function has high cost. Add this script to your first starting function and you will not have to remove al debugs all the time.
#if UNITY_EDITOR
Debug.logger.logEnabled = true;
#else
Debug.logger.logEnabled = false;
#endif
Best Luke
Your answer
Follow this Question
Related Questions
Phone App(not game) : should I load UI panels as assets or load it as new scene? 0 Answers
Question about 'performance' between iPhone4 and (4s & ipad3) 2 Answers
If I update Unity, will I lose my existing iOS and Android licences? 2 Answers
Web based AR app 9 Answers
How access asset files in android/ios 0 Answers