mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
19 lines
559 B
C#
19 lines
559 B
C#
using HarmonyLib;
|
|
using NewHorizons.Handlers;
|
|
using OWML.Logging;
|
|
|
|
namespace NewHorizons.Patches.StreamingPatches
|
|
{
|
|
[HarmonyPatch(typeof(StreamingManager))]
|
|
public static class StreamingManagerPatches
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch(nameof(StreamingManager.UnloadStreamingAssets))]
|
|
public static bool StreamingManager_UnloadStreamingAssets(string assetBundleName)
|
|
{
|
|
// Only let it unload stuff that isn't being used
|
|
return !StreamingHandler.IsBundleInUse(assetBundleName);
|
|
}
|
|
}
|
|
}
|