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.
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.”
By doing this, you can significantly reduce RAM usage, though it may slightly increase CPU load.
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.