From 3938b3e170b4903ca15ea5725c6256a1481b2c18 Mon Sep 17 00:00:00 2001 From: Kinsi Date: Mon, 7 Jun 2021 01:00:03 +0200 Subject: [PATCH] This exited the entire time eventho it doesnt need to lol --- GottaGoFast.csproj | 1 - GottaGoFastController.cs | 81 ---------------------------------------- 2 files changed, 82 deletions(-) delete mode 100644 GottaGoFastController.cs diff --git a/GottaGoFast.csproj b/GottaGoFast.csproj index dfdb72b..c2b55a9 100644 --- a/GottaGoFast.csproj +++ b/GottaGoFast.csproj @@ -116,7 +116,6 @@ - diff --git a/GottaGoFastController.cs b/GottaGoFastController.cs deleted file mode 100644 index 8b33bd7..0000000 --- a/GottaGoFastController.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using UnityEngine; - -namespace GottaGoFast { - /// - /// Monobehaviours (scripts) are added to GameObjects. - /// For a full list of Messages a Monobehaviour can receive from the game, see https://docs.unity3d.com/ScriptReference/MonoBehaviour.html. - /// - public class GottaGoFastController : MonoBehaviour { - public static GottaGoFastController Instance { get; private set; } - - // These methods are automatically called by Unity, you should remove any you aren't using. - #region Monobehaviour Messages - /// - /// Only ever called once, mainly used to initialize variables. - /// - private void Awake() { - // For this particular MonoBehaviour, we only want one instance to exist at any time, so store a reference to it in a static property - // and destroy any that are created while one already exists. - if(Instance != null) { - Plugin.Log?.Warn($"Instance of {GetType().Name} already exists, destroying."); - GameObject.DestroyImmediate(this); - return; - } - GameObject.DontDestroyOnLoad(this); // Don't destroy this object on scene changes - Instance = this; - Plugin.Log?.Debug($"{name}: Awake()"); - } - ///// - ///// Only ever called once on the first frame the script is Enabled. Start is called after any other script's Awake() and before Update(). - ///// - //private void Start() { - - //} - - ///// - ///// Called every frame if the script is enabled. - ///// - //private void Update() { - - //} - - ///// - ///// Called every frame after every other enabled script's Update(). - ///// - //private void LateUpdate() { - - //} - - ///// - ///// Called when the script becomes enabled and active - ///// - //private void OnEnable() { - - //} - - ///// - ///// Called when the script becomes disabled or when it is being destroyed. - ///// - //private void OnDisable() { - - //} - - /// - /// Called when the script is being destroyed. - /// - private void OnDestroy() { - Plugin.Log?.Debug($"{name}: OnDestroy()"); - if(Instance == this) - Instance = null; // This MonoBehaviour is being destroyed, so set the static instance property to null. - - } - #endregion - } -}