void RefreshButtonsVisibility() { // Path Objects should be shown if our current path is a "full path", meaning it has // 2 or more position knots. // If the current path is null, but we have paths, show Path Objects. This case is // most commonly after a sketch load. // If we don't have paths, or our current path isn't full, don't show Path Objects. bool anyPathsActive = WidgetManager.m_Instance.AnyCameraPathWidgetsActive; var currentCameraPath = WidgetManager.m_Instance.GetCurrentCameraPath(); bool currentCameraPathIsAFullPath = (currentCameraPath != null) && (currentCameraPath.WidgetScript.Path.NumPositionKnots > 1); bool showPathButtons = anyPathsActive && (currentCameraPath == null || currentCameraPathIsAFullPath); m_PathObjects.SetActive(showPathButtons); m_NoPathObjects.SetActive(!showPathButtons); // No Path Text should reflect whether we're creating our first path, or building out // another path. m_NoPathText.text = anyPathsActive || SketchSurfacePanel.m_Instance.GetCurrentToolType() == BaseTool.ToolType.CameraPathTool ? m_NonFirstPathMessage : m_FirstPathMessage; m_RecordButton.UpdateVisuals(); }
void OnSelectionChanged() { m_GroupButton.UpdateVisuals(); }
protected override void OnSelectionChanged() { m_GroupButton.UpdateVisuals(); }