예제 #1
0
        private void Start()
        {
#if KK
            if (JetPack.MoreAccessories.BuggyBootleg)
            {
#if DEBUG
                if (!JetPack.MoreAccessories.Installed)
                {
                    _logger.LogError($"Backward compatibility in BuggyBootleg MoreAccessories is disabled");
                    return;
                }
#else
                _logger.LogError($"Could not load {Name} {Version} because it is incompatible with MoreAccessories experimental build");
                return;
#endif
            }
#endif
            JetPack.Chara.OnChangeCoordinateType += (_sender, _args) =>
            {
                if (_args.State == "Prefix")
                {
                    DuringLoad[_args.ChaControl] = true;
                }
                else if (_args.State == "Postfix")
                {
                    DuringLoad[_args.ChaControl] = false;
                }
                else if (_args.State == "Coroutine")
                {
                    DuringLoad[_args.ChaControl] = false;
                }
            };

            JetPack.Chara.OnLoadCharaFbxData += (_sender, _args) =>
            {
                Hooks.ChaControl_LoadCharaFbxDataAsync_Prefix(_args.GameObject);
            };

            HooksInstance = Harmony.CreateAndPatchAll(typeof(Hooks), GUID);
            MaterialEditorSupport();
        }