/// <summary> /// Only ever called once, mainly used to initialize variables. /// </summary> private void Awake() { if (instance != null) { DestroyImmediate(this); } instance = this; DontDestroyOnLoad(this); Plugin.log.Debug($"FPFCController awake."); }
/// <summary> /// Called when the script is being destroyed. /// </summary> private void OnDestroy() { instance = null; }