Skip to content

Commit

Permalink
Don't run setup outside of loading screen
Browse files Browse the repository at this point in the history
KSP tries to re-instantiate all addons ona a database reload.  It NREs because the loading screen doesn't exist anymore.  None of this stuff needs to be run again.
  • Loading branch information
blowfishpro committed Nov 25, 2018
1 parent 458b486 commit dd851a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ModuleManager/ModuleManager.cs
Expand Up @@ -60,6 +60,12 @@ public static void Log(String s)

internal void Awake()
{
if (LoadingScreen.Instance == null)
{
Destroy(gameObject);
return;
}

totalTime.Start();

// Allow loading the background in the laoding screen
Expand Down

0 comments on commit dd851a1

Please sign in to comment.