public virtual void InitArgs(int zOrder, GameObject go, IViewMgr mgr, params object[] args) { this._zOrder = zOrder; this._uiObj = go; this._viewMgr = mgr; this._evtSet = new HashSet <string>(); try { CnUiComponent comp = this.GetCnUiComponent(); if (comp != null) { bool ret = comp.InitUiComponent(this._uiObj.transform); ZLog.I(this._uiObj, "ui {0} init compent {1}", this.GetName(), ret ?"ok":"failed"); } else { ZLog.I(this._uiObj, "ui {0} no init compent", this.GetName()); } this.OnLoad(args); }catch (Exception e) { ZLog.E(this._uiObj, " ui {0} OnLoad err {1}", this.GetName(), e.ToString()); } }
public override void InitArgs(int zOrder, GameObject go, IViewMgr mgr, params object[] args) { this.view.Host = this; base.InitArgs(zOrder, go, mgr, args); }