diff --git a/NewHorizons/Patches/ProfilerPatch.cs b/NewHorizons/Patches/ProfilerPatch.cs index 31821d3e..39f6cb83 100644 --- a/NewHorizons/Patches/ProfilerPatch.cs +++ b/NewHorizons/Patches/ProfilerPatch.cs @@ -3,6 +3,7 @@ using HarmonyLib; using System.Collections.Generic; using System.Reflection; +using UnityEngine; using UnityEngine.Profiling; namespace NewHorizons.Patches; @@ -28,9 +29,9 @@ public static class ProfilerPatch if (!( method.Name.StartsWith("Make") || method.Name.StartsWith("Init") || - method.Name.StartsWith("Find") || method.Name == "SetUpStreaming" || - method.Name == "OnSceneLoaded" + method.Name == "OnSceneLoaded" || + method.DeclaringType.Name.EndsWith("Utilities") )) continue; if (method.ContainsGenericParameters) continue; @@ -60,4 +61,13 @@ public static class ProfilerPatch } } +[HarmonyPatch] +public static class EvilPatch +{ + [HarmonyPrefix] + [HarmonyPatch(typeof(StackTraceUtility), "ExtractStackTrace")] + [HarmonyPatch(typeof(Application), "CallLogCallback")] + private static bool DisableShaderLogSpam() => false; +} + #endif