public override void OnLevelUnloading() { Log.Info("OnLevelUnloading"); base.OnLevelUnloading(); Instance = this; revertDetours(); gameLoaded = false; Object.Destroy(UI); UI = null; try { TrafficPriority.OnLevelUnloading(); CustomCarAI.OnLevelUnloading(); CustomRoadAI.OnLevelUnloading(); CustomTrafficLights.OnLevelUnloading(); TrafficLightSimulation.OnLevelUnloading(); VehicleRestrictionsManager.OnLevelUnloading(); Flags.OnLevelUnloading(); Translation.OnLevelUnloading(); } catch (Exception e) { Log.Error("Exception unloading mod. " + e.Message); // ignored - prevents collision with other mods } }
public override void OnLevelUnloading() { Log.Info("OnLevelUnloading"); base.OnLevelUnloading(); if (Instance == null) { Instance = this; } revertDetours(); gameLoaded = false; try { TrafficPriority.OnLevelUnloading(); CustomCarAI.OnLevelUnloading(); CustomRoadAI.OnLevelUnloading(); CustomTrafficLights.OnLevelUnloading(); TrafficLightSimulation.OnLevelUnloading(); Flags.OnLevelUnloading(); Translation.OnLevelUnloading(); if (Instance != null) { Instance.NodeSimulationLoaded = false; } } catch (Exception e) { Log.Error("Exception unloading mod. " + e.Message); // ignored - prevents collision with other mods } }
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 } }