示例#1
0
        internal static void MaterialEditorSupport()
        {
            Type MaterialEditorHooks = JetPack.MaterialEditor.Instance.GetType().Assembly.GetType("KK_Plugins.MaterialEditor.Hooks");

            HooksInstance.Patch(MaterialEditorHooks.GetMethod("ChaControl_UpdateSiru_Postfix", AccessTools.all), prefix: new HarmonyMethod(typeof(Hooks), nameof(Hooks.Return_False)));

            if (JetPack.CharaStudio.Running)
            {
                JetPack.MaterialEditor.OnDataApply += (_sender, _args) =>
                {
                    ChaControl chaCtrl = (_args.Controller as MaterialEditorCharaController).ChaControl;
                    chaCtrl.StartCoroutine(Hooks.ChaControl_UpdateClothesSiru_Coroutine(chaCtrl));
                };
            }
        }