Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Source/MASMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,30 @@ public void OnDestroy()
}
}

/// <summary>
/// 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.
/// </summary>
public override void OnBecomeInactive()
{
if (screenCamera != null)
{
screenCamera.enabled = false;
}
}

/// <summary>
/// Re-enable the screen camera when the IVA becomes active again.
/// </summary>
public override void OnBecomeActive()
{
if (screenCamera != null)
{
screenCamera.enabled = true;
}
}

/// <summary>
/// Just in case we lose context.
/// </summary>
Expand Down