mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Print path when failing to LoadAudio
This commit is contained in:
parent
bef2a32cef
commit
2f4a4a7099
@ -45,6 +45,8 @@ namespace NewHorizons.Utility
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static AudioClip LoadAudio(string path)
|
public static AudioClip LoadAudio(string path)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (_loadedAudioClips.ContainsKey(path))
|
if (_loadedAudioClips.ContainsKey(path))
|
||||||
{
|
{
|
||||||
@ -57,6 +59,12 @@ namespace NewHorizons.Utility
|
|||||||
_loadedAudioClips.Add(path, task.Result);
|
_loadedAudioClips.Add(path, task.Result);
|
||||||
return task.Result;
|
return task.Result;
|
||||||
}
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
Logger.LogError($"Couldn't load Audio at {path} : {ex}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void ClearCache()
|
public static void ClearCache()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user