fix event duplication

This commit is contained in:
_nebula 2025-02-23 21:42:19 +00:00
parent 1c7b895e27
commit 5d09c9bb87

View File

@ -363,14 +363,12 @@ public class QSBCore : ModBehaviour
{ {
DebugSettings.Update(config); DebugSettings.Update(config);
Application.logMessageReceived -= OnDebugLog;
if (DebugSettings.HookDebugLogs) if (DebugSettings.HookDebugLogs)
{ {
Application.logMessageReceived += OnDebugLog; Application.logMessageReceived += OnDebugLog;
} }
else
{
Application.logMessageReceived -= OnDebugLog;
}
// Configure gets called before Start, so these might not exist yet // Configure gets called before Start, so these might not exist yet
if (GetComponent<DebugActions>() != null) if (GetComponent<DebugActions>() != null)