AudioImporter.format Manual     Reference     Scripting  
Scripting > Editor Classes > AudioImporter
AudioImporter.format

var format : AudioImporterFormat

Description

Format of imported audio.

See Also: AudioImporterFormat.

// Prints when an imported audio is compressed

class CompressionLogger extends AssetPostprocessor {
function OnPreprocessAudio () {
var audioImporter : AudioImporter = assetImporter;

if (audioImporter.format == AudioImporterFormat.Compressed) {
Debug.Log(assetPath + " Is compressed");
}
}
}