From 79fb279ba445c601a84070bce5a0261e7529f783 Mon Sep 17 00:00:00 2001 From: Mark Kilfoil Date: Sat, 4 Jul 2026 23:25:58 -0300 Subject: [PATCH] Fix MASMonitor screen camera rendering to main display when IVA is inactive When the active vessel switches (e.g. crew goes on EVA), KSP calls OnBecomeInactive() on all InternalModules. MASMonitor's screenCamera is left enabled with ClearFlags.SolidColor and an opaque-black background, so it renders to the main screen every frame, wiping the skybox and scaled-space bodies (Mun, Kerbin, etc.) until the vessel is reactivated. Fix: override OnBecomeInactive() to disable screenCamera, and OnBecomeActive() to re-enable it. --- Source/MASMonitor.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Source/MASMonitor.cs b/Source/MASMonitor.cs index 5fb47f6d..369a2493 100644 --- a/Source/MASMonitor.cs +++ b/Source/MASMonitor.cs @@ -344,6 +344,30 @@ public void OnDestroy() } } + /// + /// Disable the screen camera when the IVA becomes inactive (e.g. on EVA or vessel switch). + /// Without this, the camera renders to the main screen with its opaque-black SolidColor + /// clear, wiping the skybox and scaled-space bodies every frame. + /// + public override void OnBecomeInactive() + { + if (screenCamera != null) + { + screenCamera.enabled = false; + } + } + + /// + /// Re-enable the screen camera when the IVA becomes active again. + /// + public override void OnBecomeActive() + { + if (screenCamera != null) + { + screenCamera.enabled = true; + } + } + /// /// Just in case we lose context. ///