public object Invoke(HotfixObject rHotfixObj, string rMethodName, params object[] rArgs) { if (mApp == null) { return(null); } return(mApp.Invoke(rHotfixObj, rMethodName, rArgs)); }
public override object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs) { if (mApp == null || rHotfixObj == null) { return(null); } return(this.mApp.Invoke(rParentType, rMethodName, rHotfixObj.Object, rArgs)); }
public async Task Initialize() { // 加载Hotfix端的代码 this.MainLogicHotfixObj = HotfixManager.Instance.Instantiate(this.MainLogicScript); // 加载Hotfix端的代码 await(HotfixManager.Instance.Invoke(this.MainLogicHotfixObj, "Initialize") as Task); }
protected void InitHotfixMB() { if (mMBHotfixObj == null && !string.IsNullOrEmpty(mHotfixName)) { this.mParentType = string.Format(this.mParentType, this.mHotfixName); this.mMBHotfixObj = HotfixManager.Instance.Instantiate(this.mHotfixName); this.mMBHotfixObj.InvokeParent(this.mParentType, "Awake_Proxy", this.gameObject, this.mObjects); } }
public override object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs) { if (mApp == null) { return(null); } Type rObjType = mApp.GetType(rParentType); return(ReflectionAssist.MethodMember(rHotfixObj.Object, rMethodName, ReflectionAssist.flags_method_inst, rArgs)); }
public override HotfixObject Instantiate(string rTypeName, params object[] rArgs) { if (mApp == null) { return(null); } var rObject = new HotfixObject(this, rTypeName); rObject.Object = Activator.CreateInstance(mApp.GetType(rTypeName), rArgs); return(rObject); }
public override HotfixObject Instantiate(string rTypeName, params object[] rArgs) { if (mApp == null) { return(null); } var rObject = new HotfixObject(this, rTypeName); rObject.Object = this.mApp.Instantiate(rTypeName, rArgs); return(rObject); }
protected virtual void OnDestroy() { if (mMBHotfixObj != null) { mMBHotfixObj.InvokeParent(this.mParentType, "OnDestroy_Proxy"); } if (mObjects != null) { mObjects.Clear(); } mMBHotfixObj = null; mObjects = null; }
public virtual object InvokeParent(HotfixObject rHotfixObj, string rParentType, string rMethodName, params object[] rArgs) { return(null); }