void loadViews() { string[] nms = getViewNames(); int count = nms.Length; for (int i = 0; i < nms.Length; i++) { string viewShortName = nms[i]; NwkUiTabs.loadView(viewShortName, delegate(bool success) { if (tabs == null) { tabs = GameObject.FindObjectOfType <NwkUiTabs>(); } if (openedStartupViewName.Length > 0) { //Debug.Log(viewShortName + " == " + openedStartupViewName); if (viewShortName.Contains(openedStartupViewName)) { iNwkUiTab tab = NwkUiTabs.getTabByNameGlobal(viewShortName); Debug.Log(tab); tab?.showTab(); //tabs.getTabByName(viewShortName).showTab(); } } count--; if (count <= 0) { onAllViewsLoaded(); } }); } }