Created
June 7, 2015 16:35
-
-
Save yasuakiohama/b5e42947afaae92f28ea to your computer and use it in GitHub Desktop.
CustomImporter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public sealed class CustomImporter : AssetPostprocessor | |
{ | |
public override int GetPostprocessOrder() | |
{ | |
return 0; | |
} | |
void OnPreprocessAudio() | |
{ | |
//大文字小文字対応 | |
//ここ入れた文字がパスにあるフォルダのデータは3Dサウンドのチェックが外れる | |
if (assetPath.Contains("Voice")) | |
{ | |
AudioImporter audioImporter = assetImporter as AudioImporter; | |
//audioImporter.format = AudioImporterFormat.Compressed; | |
audioImporter.threeD = false; //2d sound | |
//audioImporter.compressionBitrate = 96000; //96kbps | |
} | |
//BGM | |
else if (assetPath.Contains("BGM")) | |
{ | |
AudioImporter audioImporter = assetImporter as AudioImporter; | |
// audioImporter.format = AudioImporterFormat.Compressed; | |
audioImporter.threeD = false; //2d sound | |
//ストリーミング再生 | |
// audioImporter.loadType = AudioClipLoadType.Streaming; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment