protected virtual void OnDestroy() { if (mMBHotfixObj == null) { return; } mMBHotfixObj.OnDestroy(); mObjects.Clear(); mBaseDatas.Clear(); mMBHotfixObj = null; }
private void InitHotfixMB() { if (mMBHotfixObj == null) { mMBHotfixObj = HotfixApp.Instance.Instantiate <HotfixMB>(mHotfixName); } if (mMBHotfixObj != null) { mMBHotfixObj.SetHotfixName(mHotfixName); mMBHotfixObj.Initialize(this.mObjects, this.ToBaseDataObjects(mBaseDatas)); mMBHotfixObj.Awake(); } }
public void InitHotfixMB() { if (mMBHotfixObj == null && !string.IsNullOrEmpty(mHotfixName)) { mMBHotfixObj = HotfixApp.Instance.Instantiate <HotfixMB>(mHotfixName); mMBHotfixObj.SetHotfix(mHotfixName, this.gameObject); if (this.mObjects == null) { this.mObjects = new List <UnityObject>(); } mMBHotfixObj.Initialize(this.mObjects, this.ToBaseDataObjects(mBaseDatas)); } }
protected virtual void OnDestroy() { if (mMBHotfixObj != null) { mMBHotfixObj.OnDestroy(); } if (mObjects != null) { mObjects.Clear(); } if (mBaseDatas != null) { mBaseDatas.Clear(); } mMBHotfixObj = null; mObjects = null; mBaseDatas = null; }