public void UpdateCurrentTool()
        {
            UnityEngine.Profiling.Profiler.BeginSample("SketchSurfacePanel.UpdateCurrentTool");
            m_UpdatedToolThisFrame = true;
            ActiveTool.UpdateTool();
            if (ActiveTool.ExitRequested())
            {
                // Requesting a tool exit puts us back at our default tool.
                ActiveTool.EnableTool(false); // clean up current tool
                EnableDefaultTool();
                ActiveTool.EatInput();

                // If we're currently loading, hide our default tool.
                if (App.Instance.IsLoading())
                {
                    PointerManager.m_Instance.RequestPointerRendering(false);
                }
            }
            UnityEngine.Profiling.Profiler.EndSample();
        }
Beispiel #2
0
        public void EnableSpecificTool(BaseTool.ToolType rType)
        {
            if (ActiveTool.m_Type == rType)
            {
                return;
            }

            for (int i = 0; i < m_Tools.Length; ++i)
            {
                if (m_Tools[i].m_Type == rType)
                {
                    ActiveTool.EnableTool(false);

                    m_ActiveToolIndex = i;
                    ActiveTool.EnableTool(true);
                    m_ToolSelectionAggregateValue = 0.0f;
                    App.Switchboard.TriggerToolChanged();
                    return;
                }
            }
        }