mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Log when audio type handler messes up
This commit is contained in:
parent
8fda499d62
commit
4a2837a824
@ -30,7 +30,18 @@ namespace NewHorizons.Handlers
|
||||
Logger.LogVerbose($"Adding all custom AudioTypes to the library");
|
||||
|
||||
var library = Locator.GetAudioManager()._libraryAsset;
|
||||
library.audioEntries = library.audioEntries.Concat(_audioEntries).ToArray();
|
||||
|
||||
foreach (var entry in _audioEntries)
|
||||
{
|
||||
try
|
||||
{
|
||||
library.audioEntries = library.audioEntries.Append(entry).ToArray();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't add audio entry {entry.clips[0].name} to libary: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
Locator.GetAudioManager()._audioLibraryDict = library.BuildAudioEntryDictionary();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user