From 214ebba17224bac120f6eac541b2ce8cc68cdbfd Mon Sep 17 00:00:00 2001 From: minenice55 Date: Wed, 10 Jan 2024 18:53:57 -0500 Subject: [PATCH] create the mp3 -> wav cache if it doesn't exist --- Assets/Scripts/Minigames.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 31412c9b..8d155908 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -155,6 +155,8 @@ namespace HeavenStudio { Directory.Delete(Path.Combine(Application.temporaryCachePath, "/savewav"), true); } + if (!Directory.Exists(Application.temporaryCachePath, "/savewav")) + Directory.CreateDirectory(Application.temporaryCachePath, "/savewav"); if (audioType == AudioType.MPEG) { Debug.Log($"mp3 loaded, Converting {filePath} to wav..."); @@ -1194,4 +1196,4 @@ namespace HeavenStudio } } } -} \ No newline at end of file +}