Ejemplo n.º 1
0
        /// <summary>
        /// 执行热更新
        /// </summary>
        private void RunHotFixVrCoreEntity()
        {
            //热更代码入口处
            _hotFixVrCoreEntity = Appdomain.Instantiate <SubMonoBehavior>("HotFix.Taurus.HotFixMode");
#if UNITY_EDITOR
            if (_hotFixVrCoreEntity == null)
            {
                UnityEngine.Debug.LogError("_hotFixVrCoreEntity == null \n 无法进入热更代码!");
            }
#endif
        }
Ejemplo n.º 2
0
        public bool EnterHotfix(ResourceManager rm)
        {
            bool       result = false;
            HotFixPath?path   = HotfixManager.HotFixPath;

            //加载热更代码,此处根据资源管理的加载资源的方式确定加载AB文件还是bytes文件
            result          = LoadHotFixCode(rm, path?.DllPath, path?.MdbPath);
            _assemblyEntity = (SubMonoBehavior)_hotfixAssembly.CreateInstance("HotFix.Taurus.HotFixMode");
            //if (_assemblyEntity != null)
            //    _assemblyEntity.Start();
            return(result);
        }