/// <summary>
        /// 初始化助手
        /// </summary>
        public void OnInitialization()
        {
            _module = Module as HotfixManager;

            if (_module.IsEnableHotfix)
            {
                foreach (Enum e in Enum.GetValues(typeof(HotfixMethodType)))
                {
                    FixedMethods.Add((HotfixMethodType)e, new Dictionary <string, MethodInfo>());
                    FixedDelegates.Add((HotfixMethodType)e, new Dictionary <string, Delegate>());
                }
            }
        }
Exemple #2
0
        private void OnEnable()
        {
            _target          = target as HotfixManager;
            _hotfixIsCreated = false;
            string hotfixDirectory              = Application.dataPath + _hotfixDirectory;
            string hotfixEnvironmentPath        = Application.dataPath + _hotfixEnvironmentPath;
            string hotfixAssemblyDefinitionPath = Application.dataPath + _hotfixAssemblyDefinitionPath;

            if (Directory.Exists(hotfixDirectory))
            {
                if (File.Exists(hotfixEnvironmentPath))
                {
                    if (File.Exists(hotfixAssemblyDefinitionPath))
                    {
                        _hotfixIsCreated = true;
                    }
                }
            }
        }