Audio Optimization in Unity: How Poor Music Settings Can Cause High RAM Usage

We’re back with our Visual Novel game. In the previous article, I discussed how textures can use a lot of RAM. This time, we’ll focus on sounds, specifically background music.

In the game, a looping music track plays in the background, supporting the story. How can something like this use so much RAM? The answer is improper audio settings.

Old settings
RAM usage

The music track lasts several minutes and is not set to streaming mode. As a result, the entire audio file is loaded into RAM, leading to high RAM usage.

Fortunately, you don’t need to change any code! Just adjusting the audio settings can solve the problem.

The solution is to switch the settings to “streaming.”

New settings

By doing this, you can significantly reduce RAM usage, though it may slightly increase CPU load.

RAM usage after new import settings

Optimizing audio settings in Unity is essential for managing RAM usage in games. Setting long music tracks to streaming mode can significantly reduce system resource consumption, enhancing game performance.

By Rufi

Leave a Reply

Your email address will not be published. Required fields are marked *