private void InitializeUI() { if (menuComponent == null) { menuComponent = SpawnUI <Menus.MainMenuGUI>(StringConstants.PrefabMainMenu); } ShowUI(); // If you're not signed in, many features are disabled. // Only display the shared/bonus levels if the user has at least one. menuComponent.SharedLevelsButton.gameObject.SetActive( CommonData.ShowInternetMenus() && CommonData.currentUser.data.sharedMaps.Count > 0); menuComponent.BonusLevelsButton.gameObject.SetActive( CommonData.ShowInternetMenus() && CommonData.currentUser.data.bonusMaps.Count > 0); // Display the account button on all devices, including in the Unity Editor menuComponent.AccountButton.gameObject.SetActive(CommonData.ShowInternetMenus()); // Editor is disabled in VR mode. menuComponent.EditorButton.gameObject.SetActive( !CommonData.inVrMode && CommonData.ShowInternetMenus()); // If you're NOT signed in, the main menu has a button to sign in: menuComponent.SignInButton.gameObject.SetActive(CommonData.isNotSignedIn); }
public override void Initialize() { Debug.Log("Init MainMenu"); MainMenuComponent = SpawnUI <Menus.MainMenuGUI>(StringConstants.PrefabMainMenu); MainMenuComponent.SetMenu(); CommonData.drawGraph.InitDrawGrid(); }
private void InitializeUI() { if (menuComponent == null) { menuComponent = SpawnUI <Menus.MainMenuGUI>(StringConstants.PrefabMainMenu); } ShowUI(); }