forceToMono
Force audioclips to mono sound type, so all audio plays through a single channel.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Property
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public bool forceToMono { get; set; }
Examples
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; } }}