예제 #1
0
 private static void SceneLoaded(Scene _scene, LoadSceneMode _loadSceneMode)
 {
     DebugLog($"[SceneLoaded][name: {_scene.name}][mode: {_loadSceneMode}]");
     if (_scene.name == "CustomScene")
     {
         CharaMaker.InvokeOnMakerStartLoading(null, null);
     }
     else if (_scene.name == "HProc" || _scene.name == "VRHScene")
     {
         CharaHscene.Inside = true;
         CharaHscene.Hooks.Init();
         CharaHscene.InvokeOnHSceneStartLoading(null, null);
     }
 }
예제 #2
0
        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();
            }
        }