public static D04CustomerServiceView CreateCSView() { Object obj = Resources.Load("pbD04CustomerServiceView"); GameObject go = Instantiate(obj) as GameObject; SDK.AddChild(go, WGRootManager.Self.goRootTopUI); D04CustomerServiceView cs = go.GetComponent <D04CustomerServiceView>(); return(cs); }
void OnBtnKefu() { D04CustomerServiceView cs = D04CustomerServiceView.CreateCSView(); cs.alertViewBehavriour = (ab, view) => { switch (ab) { case MDAlertBehaviour.CLICK_OK: view.hiddenView(); break; case MDAlertBehaviour.DID_HIDDEN: Destroy(view.gameObject); break; } }; cs.showView(); }