AudioImporter.threeD 3D
var threeD : bool
Description描述
Set/get the way Unity is loading the Audio data.
设置/获取Unity加载音频数据的方法。
// Simple script that if an imported audio contains the "DL_" string
// in its filename, it sets the loadType to DecompressOnLoad.
//如果一个导入的音频它的名字中包含DL_字符串,它设置加载类型到DecompressOnLoad
class MyAudioPostprocessor extends AssetPostprocessor {
function OnPreprocessAudio () {
if (assetPath.Contains("DL_")) {
var audioImporter : AudioImporter = assetImporter;
audioImporter.loadType = AudioImporterLoadType.DecompressOnLoad;
}
}
}
See Also: AudioImporterLoadType Is this clip a 2D or 3D sound?
AudioImporterLoadType这个剪辑是看一个2D或3D声音?
// Prints a warning if the imported audio is a 2D sound.
//如果导入的音频是一个2D声音,打印警告
class Warning2D extends AssetPostprocessor {
function OnPreprocessAudio () {
var audioImporter : AudioImporter = assetImporter;
if(!audioImporter.threeD)
Debug.LogWarning(assetPath + " is not a 3D audio.");
}
}
最后修改:2011年5月26日 Thursday 10:51