sealed public override void Init() { base.Init(); mUIHotFixer = this; HotFixerInteractor interacter = UIInteracterCreater?.Invoke(); interacter.SetUIModular(mUIHotFixer); if (UIInteracterHandler != default) { mUI.Remove(UIModularHandler); mUI.Add(UIInteracterHandler); "log: UI {0} add modular handler (UIInteracterHandler), UI type is ".Log(mUI.ToString()); } else { } mBridge = UIAgent.Bridge; mBridge.SetHotFixInteractor(interacter); ILRuntimeUtils.InvokeMethodILR(mUIHotFixer, UIAgent.UIModularName, "UIInit", 0); }
/// <summary> /// 相应更新远程资源事件的处理函数 /// </summary> public virtual void UpdateRemoteAssetHandler() { HotFixSubgroup hotFixSubgroup = GameComponent.HotFixSubgroup; if (hotFixSubgroup.applyILRuntime && !string.IsNullOrEmpty(hotFixSubgroup.initerNameInResource)) { #if ILRUNTIME StartILRuntime(); #endif GameObject mainBridge = Resources.Load <GameObject>(hotFixSubgroup.initerNameInResource); mainBridge = Instantiate(mainBridge); HotFixerComponent hotfixer = mainBridge.GetComponent <HotFixerComponent>(); ILRuntimeUtils.InvokeMethodILR(hotfixer.ShellBridge, hotFixSubgroup.initerClassName, hotFixSubgroup.initerGameCompSetter, 1, GameComponent); } else { mClientVersions = GameComponent.DevelopSetting.remoteAssetVersions; if (mClientVersions != default) { UIManager uis = ShipDockApp.Instance.UIs; mStartingUpdatePopup = (IStartingUpdatePopup)uis.OpenResourceUI <MonoBehaviour>(GameComponent.DevelopSetting.resUpdatePopupPath); mClientVersions.LoadRemoteVersion(OnLoadComplete, OnVersionInvalid, out _);//加载远端服务器的资源版本 } else { AfterStartingLoadComplete(); } } }
public static void ClearDebugService() { #if DEBUG && (UNITY_EDITOR || UNITY_ANDROID || UNITY_IPHONE) isDebugServiceStarted = false; AppDomain appDomain = ILRuntimeUtils.GetILRuntimeHotFix().ILAppDomain; appDomain.DebugService.StopDebugService(); #endif }
public sealed override void Interrupt() { base.Interrupt(); if (!IsExited) { ILRuntimeUtils.InvokeMethodILR(mUIHotFixer, UIAgent.UIModularName, "UIInterrupt", 0); } else { } }
public static void StartDebugServices(int debugPort) { #if DEBUG && (UNITY_EDITOR || UNITY_ANDROID || UNITY_IPHONE) if (!isDebugServiceStarted) { isDebugServiceStarted = true; AppDomain appDomain = ILRuntimeUtils.GetILRuntimeHotFix().ILAppDomain; appDomain.UnityMainThreadID = System.Threading.Thread.CurrentThread.ManagedThreadId; appDomain.DebugService.StartDebugService(debugPort); } else { } #endif }
protected sealed override void Purge() { if (UIInteracterHandler != default) { mUI.Remove(UIInteracterHandler); } else { } ILRuntimeUtils.InvokeMethodILR(mUIHotFixer, UIAgent.UIModularName, "UIExit", 0); mBridge = default; mUIHotFixer = default; }
private void ApplyCustomNotice() { string methodName = m_LoadedNoticeInfo.GetIDAsCustomNoticeMethod; if (string.IsNullOrEmpty(methodName)) { mIDAsNotice = Pooling <Notice> .From(); } else { ILRuntimeUtils.InvokeMethodILR(ShellBridge, m_StartUpInfo.ClassName, methodName, 0, OnGetIDAsNoticeHandler); if (mIDAsNotice == default) { mIDAsNotice = Pooling <Notice> .From(); } else { } } }
/// <summary> /// ILRuntime热更应用域引用 /// </summary> /// <returns></returns> protected virtual AppDomain ILAppDomain() { return(ILRuntimeUtils.GetILRuntimeHotFix().ILAppDomain); }
public void SetHotFixInteractor(HotFixerInteractor target) { HotFixerInteractor = target; ILRuntimeUtils.InvokeMethodILR(target, Agent.UIInteractorName, "InitInteractor", 2, this, Agent); }
protected override void ILRuntimeLoaded() { base.ILRuntimeLoaded(); ILRuntimeUtils.InvokeMethodILR(ShellBridge, m_StartUpInfo.ClassName, "SetEnterInitedCallback", 2, ShipDockAppOwner, ILHotFixerEnterInited); }
sealed public override void Enter() { base.Enter(); ILRuntimeUtils.InvokeMethodILR(mUIHotFixer, UIAgent.UIModularName, "UIEnter", 0); }
protected sealed override void ShowUI() { base.ShowUI(); ILRuntimeUtils.InvokeMethodILR(mUIHotFixer, UIAgent.UIModularName, "UIShow", 0); }