I finished building my iOS game. But just after loading the first level the game freezes for a sec. This only happens in xCode on the device itself (IphoneX, Iphone 5s). The Unity profiler shows that it has something to do with the Application.LoadLevelAsync Integrate and the Awake function from my GameOverManager script.
See screenshot: Screenshot by Lightshot
Also the Camera.Render gives a spike on that same specific frame. Just right after level loading. Same moment.
See screenshot: Screenshot by Lightshot
I tried everything to solve this. I implemented all performance tips I could find. I optimized the Awake function of the GameOverManager script. I tried all kinds of optimizations but nothing seems to help.
This is the Awake function from the GameOverManager script: Screenshot by Lightshot
This is how that specific scene and Hierarchy looks like. Screenshot by Lightshot
I’m becoming a bit desperate :):(. Hope that somebody has a tip on how to solve this?