Esempio n. 1
0
 public override void OnReleased()
 {
     try
     {
         DebugUtils.Log("Restoring default values");
         DefaultOptions.RestoreAll();
         DefaultOptions.Clear();
     }
     catch (Exception e)
     {
         DebugUtils.LogException(e);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Called when the level is unloaded
        /// </summary>
        public override void OnLevelUnloading()
        {
            try
            {
                DebugUtils.Log("Restoring default values");
                DefaultOptions.RestoreAll();
                DefaultOptions.Clear();

                if (instance != null)
                {
                    GameObject.Destroy(instance.gameObject);
                }

                AdvancedVehicleOptions.isGameLoaded = false;
            }
            catch (Exception e)
            {
                DebugUtils.LogException(e);
            }
        }