LanguageEnglish
  • C#

AudioImporter.forceToMono

public bool forceToMono;

Description

Force audioclips to mono?

using UnityEngine;
using UnityEditor;

public class Example : AssetPostprocessor { void OnPreprocessAudio() { AudioImporter audioImporter = assetImporter as AudioImporter; if (assetPath.Contains("mono")) { audioImporter = assetImporter as AudioImporter; audioImporter.forceToMono = true; } } }

Did you find this page useful? Please give it a rating: