public void OnBackToScene() { RestoreViewParameters(); GlobalState.Instance.playerController.IsInLobby = false; world.SetActive(true); gameObject.SetActive(false); // Change volume sceneVolume.SetActive(true); lobbyVolume.SetActive(false); // Activate palette palette.SetActive(true); // Show windows (vehicle_hud) vehicleHUD.SetActive(true); // Active tool ToolsManager.ActivateCurrentTool(true); // Activate selection helper GlobalState.Instance.toolsController.Find("SelectionHelper").gameObject.SetActive(true); // Set selector tool active ToolsUIManager.Instance.ChangeTab("Selector"); ToolsManager.ChangeTool("Selector"); }
public void OnSetVisible(bool start = false) { // Stop play if playing AnimationEngine.Instance.Pause(); ResetVRCamera(); GlobalState.Instance.playerController.IsInLobby = true; world.SetActive(false); gameObject.SetActive(true); // Change volume sceneVolume.SetActive(false); lobbyVolume.SetActive(true); // Hide all windows (vehicle_hud) vehicleHUD.SetActive(false); // Deactive current tool ToolsManager.ActivateCurrentTool(false); // Deactivate selection helper GlobalState.Instance.toolsController.Find("SelectionHelper").gameObject.SetActive(false); // Orient lobby float camY = Camera.main.transform.localEulerAngles.y; transform.localEulerAngles = new Vector3(0f, camY, 0f); LoadProjectItems(); if (!start) { HighlightSelectedProject(); launchProjectButton.Disabled = true; // Hide & disable palette palette.SetActive(false); } else { currentProject = null; } backToSceneButton.Disabled = start; // Set lobby tool active ToolsManager.ChangeTool("Lobby"); needToSetCameraRef = true; }