Example #1
0
        public override void OnToolGUI(EditorWindow window)
        {
            if (lastSelectedTool == null ||
                lastSelectedTool != this)
            {
                if (lastSelectedTool != null)
                {
                    lastSelectedTool.OnDeactivate();
                }
                lastSelectedTool = this;
                OnActivate();
            }
            var sceneView = window as SceneView;
            var dragArea  = sceneView.position;

            dragArea.position = Vector2.zero;

            ChiselOptionsOverlay.AdditionalSettings = null;
            ChiselOptionsOverlay.SetTitle(OptionsTitle);

            OnSceneGUI(sceneView, dragArea);

            ChiselOptionsOverlay.Show();
            ChiselToolsOverlay.Show();
            ChiselSnappingOptionsOverlay.Show();
        }
Example #2
0
        public override void OnToolGUI(EditorWindow window)
        {
            var matrix = Handles.matrix;

            if (lastSelectedTool == null ||
                lastSelectedTool != this)
            {
                if (lastSelectedTool != null)
                {
                    lastSelectedTool.OnDeactivate();
                }
                OnActivate();
            }
            var sceneView = window as SceneView;
            var dragArea  = sceneView.position;

            dragArea.position = Vector2.zero;

            OnSceneGUI(sceneView, dragArea);

            Handles.matrix = matrix;
        }