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.

AudioImporter.hardware

var hardware: bool;
bool hardware;
hardware as bool

Description

Use hardware voice/decoder if available.

	// C#: Use hardware voice/decoder if available when importing Audio.
	class UseHardwareDecoder extends AssetPostprocessor {
	    function OnPreprocessAudio () {
	        var audioImporter : AudioImporter = assetImporter;
	        audioImporter.hardware = true;
	    }
	}