using UnityEngine; using System.Collections; using UnityEditor; public class AudioSet : AssetPostprocessor { public void OnPreprocessAudio(){ AudioImporter audioImport=assetImporter as AudioImporter; audioImport.format=AudioImporterFormat.Compressed; audioImport.threeD=false; audioImport.loadType=AudioImporterLoadType.CompressedInMemory; audioImport.compressionBitrate=64000; Debug.Log("audioImport:"+audioImport.compressionBitrate); } }
原文地址:http://blog.csdn.net/v_leg/article/details/46484469