Memory optimization tips and tricks

In the previous profiling section, we observed a static usage of audio memory, which is very good. Yet, what if we wanted to deploy this same game to a mobile platform and needed to cut down on memory? Fortunately, there are a few tricks we can use in order to reduce the memory footprint of our audio clips in memory usage and on disk. We will review a few of those options and the trade-offs in the following exercise:

  1. Open up Unity and open the Assets/Audio/Ambient folder in the Project window. Select the lake-shore-waves2 audio clip. Then select the Inspector window and change the Load Type to Streaming as shown in the following screenshot:
Changing the Load Type on an audio clip resource
  1. Then, click ...

Get Game Audio Development with Unity 5.X now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.