private void OnSelectObject(object data) { GameObject gameObject = (GameObject)data; if ((Object)gameObject != (Object)null) { KPrefabID component = gameObject.GetComponent <KPrefabID>(); if ((Object)component != (Object)null && !component.IsInitialized()) { return; } } if ((Object)gameObject != (Object)selectedGO) { selectedGO = gameObject; CloseSubMenus(); if ((Object)selectedGO != (Object)null && ((Object)selectedGO.GetComponent <KPrefabID>() != (Object)null || (bool)selectedGO.GetComponent <CellSelectionObject>())) { AddSubMenu(detailsScreen); detailsScreen.Refresh(selectedGO); AddSubMenu(userMenu); userMenu.SetSelected(selectedGO); userMenu.Refresh(selectedGO); } else { userMenu.SetSelected(null); } } }