void Update() { if (doReset && !Application.isLoadingLevel) { //foreach (GameObject o in FindObjectsOfType<GameObject>().Where(o => o.name != "MSCUnloader")) Destroy(o); foreach (GameObject o in FindObjectsOfType <GameObject>().Where(o => o.transform.parent == null && o.name.Contains("MSCLoader"))) { DestroyImmediate(o); } Keybind.Keybinds = new List <Keybind>(); Keybind.DefaultKeybinds = new List <Keybind>(); Settings.modSettings = new List <Settings>(); Settings.modSettingsDefault = new List <Settings>(); //PlayMakerGlobals.Instance.Variables.FindFsmBool("SongImported").Value = false; ModLoader.unloader = false; ModLoader.mainMenuReturn = true; ModLoader.Init_GF(); //Application.LoadLevel(Application.loadedLevelName); doReset = false; } }
static void Prefix() => ModLoader.Init_GF();