It is important to measure and optimise the startup time of your playable ads, as this can directly impact user experience.
How to optimise your startup time
By optimising the startup time of your Unity scene, you will also improve the start up time of your playable.
- We recommend that you start by optimising by using the inbuilt Profiler in Unity.
- You may also use Chrome Dev Tools for more advanced optimisation.
- Smaller playables typically have shorter startup times - check out the guide for optimising assets.
- If youre storing prefabs of entire levels, its a good idea to remove any objects not seen in the playable, this helps to reduce initial load times. Also, remove any prefabs that arent going to be used in the playable.
Here are some common techniques which may help you achieve a lower startup time.
- Remove/reduce heavy
- Avoid using
FindObjectcalls which are slow and resource consuming, especially in update and fixed update methods only use them unless absolutely necessary.
Cacheyour references instead of dynamically finding them to avoid looking up objects as much as possible.
- Avoid unnecessary physics collisions in your scene use the
Physics Matrix- Edit > Project Settings, then select checkboxes to adjust the settings.
- Physics - avoid unnecessary use of components like
Continuous collision detection(CCD).
- Avoid using particles systems with high amounts of particles (Unity has 1000 by default, whereas 50-100 is typically suitable for a playable ad).
- Keep your project hierarchy tidy - avoid unnecessary nesting of objects, avoid deep nests.
ShaderVariantCollectionswith as few shaders as possible - refer to the guide for optimising shaders.
- If your scene requires many static objects, then consider baking them.
- Consider using batching or baking for a large number of objects that remain still or move together, although be careful as this can result in increased size. Baking may be advantageous, particularly for static meshes that are not entirely reliant on batching. Although batching does offer a performance increase, there are certain computations handled during runtime that can be avoided by baking.
- Unity Text is which is more optimal during gameplay than
TMP_Text- use TMP for end cards, and Unity text for in game text.
- Avoid using
TMP_Textautosize if possible.
Playable can help you measuring the startup time of your projects. Click here to learn how.