コンソールに警告ログを表示します
エディターでアセットと警告を関連付けるために、アセットを 2番目の引数として渡します。
関連項目: Debug.LogWarning.
// Compress all the imported audio files and
// report a warning when the importer sound is 2D.
class PreprocessAudioSettings extends AssetPostprocessor {
function OnPreprocessAudio() {
var importer : AudioImporter = assetImporter;
importer.format = AudioImporterFormat.Compressed;
if(!importer.threeD)
LogWarning(assetPath + " is a 2D sound");
}
}