mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
filter out goofy error
This commit is contained in:
parent
4488390bd9
commit
f8de674a6d
@ -1,10 +1,11 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using NewHorizons.Handlers;
|
using NewHorizons.Handlers;
|
||||||
|
using OWML.Logging;
|
||||||
|
|
||||||
namespace NewHorizons.Patches
|
namespace NewHorizons.Patches
|
||||||
{
|
{
|
||||||
[HarmonyPatch]
|
[HarmonyPatch]
|
||||||
public static class StreamingManagerPatches
|
public static class StreamingPatches
|
||||||
{
|
{
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(StreamingManager), nameof(StreamingManager.UnloadStreamingAssets))]
|
[HarmonyPatch(typeof(StreamingManager), nameof(StreamingManager.UnloadStreamingAssets))]
|
||||||
@ -12,6 +13,14 @@ namespace NewHorizons.Patches
|
|||||||
{
|
{
|
||||||
// Only let it unload stuff that isn't being used
|
// Only let it unload stuff that isn't being used
|
||||||
return !StreamingHandler.IsBundleInUse(assetBundleName);
|
return !StreamingHandler.IsBundleInUse(assetBundleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(UnityLogger), "OnLogMessageReceived")]
|
||||||
|
public static bool UnityLogger_OnLogMessageReceived(string message)
|
||||||
|
{
|
||||||
|
// Filter out goofy error that doesn't actually break anything
|
||||||
|
return !message.Contains(" is out of bounds (size=0)");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user