Skip to content

Commit 1241c26

Browse files
committed
Hack for runtime loading of WAV files on windows
1 parent bf53071 commit 1241c26

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Assets/Scripts/Utility/AssetInjection/SoundReplacement.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public static string SoundPath
4646
/// <returns>True if sound is found.</returns>
4747
public static bool TryImportSound(SoundClips sound, out AudioClip audioClip)
4848
{
49+
#if UNITY_STANDALONE_WIN
50+
// For some inane reason loading .wav files unstreamed on Windows is completely broken.
51+
return TryImportAudioClip(sound.ToString(), ".wav", true, out audioClip);
52+
#else
4953
return TryImportAudioClip(sound.ToString(), ".wav", false, out audioClip);
54+
#endif
5055
}
5156

5257
/// <summary>

0 commit comments

Comments
 (0)