private void Start() { Game.HasDarkness = typeof(ChaControl).GetProperties(AccessTools.all).Any(x => x.Name == "exType"); _hookInstance = Harmony.CreateAndPatchAll(typeof(Hooks)); Chara.Init(); KKAPI.Init(); MoreAccessories.Init(); MaterialEditor.Init(); if (CharaStudio.Running) { CharaStudio.OnStudioLoaded += CharaStudio.RegisterControls; SceneManager.sceneLoaded += CharaStudio.SceneLoaded; } else { SceneManager.sceneLoaded += SceneLoaded; CharaMaker.Init(); CharaHscene.Init(); } }
private static void KKAPI_MakerAPI_OnMakerFinishedLoading_Postfix() { CharaMaker.InvokeOnMakerFinishedLoading(null, null); _hookInstance.Unpatch(_makerAPI.GetMethod("OnMakerFinishedLoading", AccessTools.all), HarmonyPatchType.Postfix, _hookInstance.Id); }