[iOS] Resolve Excessive App Startup Latency in Unity 6
Solution
Unity 6.0.x - Unity 6.3.x
Published 7 days ago
Applications migrated to Unity 6 exhibit severe performance degradation during the initialization phase on iOS devices. Boot times frequently climb from 5 seconds to over 30 seconds. This stall primarily occurs when the UnityPlayer attempts to synchronize graphics threads while simultaneously loading large Texture2D or AudioClip assets during the splash screen or initial scene load.
To mitigate startup delays, the -force-gfx-direct argument must be appended to the Arguments Passed On Launch within the Xcode scheme settings to bypass graphics thread synchronization overhead.
An internal timing conflict in the rendering loop of Unity 6 on mobile platforms can cause the main thread to wait indefinitely for graphics worker threads during early asset instantiation. By forcing the engine into a direct graphics mode via launch arguments, the synchronous stalls are bypassed.
- Open your generated Xcode project.
- Navigate to the top menu and select Product > Scheme > Edit Scheme….
- In the left-hand sidebar, ensure the Run action is selected.
- Click on the Arguments tab in the main pane.
- Locate the Arguments Passed On Launch section and click the + button.
- Enter -force-gfx-direct as a new entry.
- Close the dialog and deploy your project to the device.
Additional Tips
- Consider moving large asset references to an
Addressablessystem to ensure the first scene remains lightweight. - Verify that GPU Skinning in your
PlayerSettingsis not causing additional compute shader pre-warming delays on older A-series chips. - If your project uses many shaders, ensure Shader Variant Collections are optimized to prevent massive pre-compilation spikes during the splash screen.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
Content inspired by a Unity discussion post.