private void Upgrade()
{
bool changed = false;
if (importClipsFormat != _AudioImporterFormat.Outdated)
{
switch (importClipsFormat)
{
case _AudioImporterFormat.Compressed:
audioImportSettings.compressionFormat = AudioImportSettings.CompressionFormat.Vorbis; // default, compressed
changed = true;
break;
case _AudioImporterFormat.Native:
audioImportSettings.compressionFormat = AudioImportSettings.CompressionFormat.PCM; // "Uncompressed pulse-code modulation."
changed = true;
break;
}
}
if (importClipsLoadType != _AudioImporterLoadType.Outdated)
{
switch (importClipsLoadType)
{
case _AudioImporterLoadType.CompressedInMemory:
audioImportSettings.loadType = AudioImportSettings.LoadType.CompressedInMemory;
changed = true;
break;
case _AudioImporterLoadType.DecompressOnLoad:
audioImportSettings.loadType = AudioImportSettings.LoadType.DecompressOnLoad;
changed = true;
break;
case _AudioImporterLoadType.StreamFromDisc:
audioImportSettings.loadType = AudioImportSettings.LoadType.Streaming; // I guess, no longer implies from disc?
changed = true;
break;
}
}
if (!importClips3D)
{
audioImportSettings.forceToMono = true;
changed = true;
}
if (changed)
{
Debug.Log("Upgraded EasyVoice settings to version " + easyVoiceVersion + ". Audio import settings in Unity 5 have changed and have been converted.");
}
}