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
}
}