Skip to content

Instantly share code, notes, and snippets.

@kimsama
Created May 1, 2013 05:34
Show Gist options
  • Save kimsama/5493899 to your computer and use it in GitHub Desktop.
Save kimsama/5493899 to your computer and use it in GitHub Desktop.
A simple custom asset post processor script which disables '3D Sound' option of an imported sound asset.
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using System.Collections;
public class CostumeAudioImporter : AssetPostprocessor
{
void OnPreprocessAudio ()
{
AudioImporter audioImporter = assetImporter as AudioImporter;
if (audioImporter == null)
return;
audioImporter.threeD = false;
audioImporter.hardware = true;
}
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment