Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Description

Format of imported audio.

	// 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"); } } }