virtual protected void setup() { NwkUiTabs tabs = GameObject.FindObjectOfType <NwkUiTabs>(); NwkUiView[] views = GameObject.FindObjectsOfType <NwkUiView>(); if (views.Length > 0) { //hide(); // default is not visible when tabs is coming if (tabs == null) { NwkUiTabs.loadView("tabs", delegate(bool success) { //failed to load tabs view if (!success) { show(); } }); } } else { Debug.Log(name + " refreshing tabs", transform); tabs.refreshTabs(); // nwk ui view setup } //hide(); }
virtual protected void destroy() { gameObject.SetActive(false); if (Application.isPlaying) { //force refresh tabs NwkUiTabs views = GameObject.FindObjectOfType <NwkUiTabs>(); if (views != null) { views.refreshTabs(); // destroy ui view } } }