Setup guide

32 | Best Practices: Mobile | Unity
Design Considerations
Please review Design Guidelines in the Mobile SDK documentation if you have not already done so.
Startup Sequence
For good VR experiences, all graphics should be rendered such that the user is always viewing a proper three-
dimensional stereoscopic image. Additionally, head-tracking must be maintained at all times.
An example of how to do this during application startup is demonstrated in the SDKExamples Startup_Sample
scene:
Solid black splash image is shown for the minimum time possible.
A small test scene with 3D logo and 3D rotating widget or progress meter is immediately loaded.
While the small startup scene is active, the main scene is loaded in the background.
Once the main scene is fully loaded, the start scene transitions to the main scene using a fade.
Universal Menu Handling
Applications will need to handle the Back Key long-press action which launches the Universal Menu as well
as the Back Key short-press action which launches the “Confirm-Quit to Home” Menu which exits the current
application and returns to the Oculus Home application.
An example of demonstrating this functionality is in the SDKExamples GlobalMenu_Sample scene.
More information about application menu options and access can be found in Universal Menu in the Mobile SDK
documentation.
Unity Profiling Tools
Even following the guidelines above, you may find you are not hitting a solid 60 FPS. The next section details the
various tools provided by Unity to help you diagnose bottlenecks in Android applications. For additional profiling
tools, see the the Performance Analysis document.
Unity Profiler
Unity Pro comes with a built-in profiler. The profiler provides per-frame performance metrics, which can be used
to help identify bottlenecks.
You may profile your application as it is running on your Android device using adb or WIFI. For steps on how to
set up remote profiling for your device, please refer to the Android section of the following Unity documentation:
https://docs.unity3d.com/Documentation/Manual/Profiler.html.