TrafficManager.LoadingExtension.OnLevelUnloading C# (CSharp) Method

OnLevelUnloading() public method

public OnLevelUnloading ( ) : void
return void
		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
			}
		}