public override void OnLevelUnloading() { base.OnLevelUnloading(); if (Instance == null) { Instance = this; } revertDetours(); try { TrafficPriority.OnLevelUnloading(); CustomCarAI.OnLevelUnloading(); TrafficLightsManual.OnLevelUnloading(); TrafficLightsTimed.OnLevelUnloading(); if (Instance != null) { Instance.NodeSimulationLoaded = false; } } catch (Exception e) { Log.Error("Exception unloading mod. " + e.Message); // ignored - prevents collision with other mods } }