Remove actions in Scene

Hello
I’m doing an extension for Unity editor - for terrains.

  1. By clicking the left mouse button on the terrain in the scene - the terrain is selected.

  2. If you hold down the left mouse button and hold on the scene - there is a rectangular area(selection box).

Is it possible to remove this action? Block.

Sorry for the error, Google translate. :slight_smile:

I found it!

using UnityEngine;
using UnityEditor;
using System.Collections;


public class test : EditorWindow
{
        public static test window;
        static SceneView.OnSceneFunc    onSceneGUIFunc;
       
        [MenuItem ("Tools/test")]
        public static void ShowWindow()
        {
                window = EditorWindow.GetWindow<test>(false,"test");
    }
       
        void OnEnable()
        {
                onSceneGUIFunc = this.OnSceneGUI;
                SceneView.onSceneGUIDelegate += onSceneGUIFunc;
        }
       
       
        void OnDestroy()
        {
                SceneView.onSceneGUIDelegate -= onSceneGUIFunc;
        }
       
       
        public void OnSceneGUI(SceneView sceneView)
        {
                if(Event.current.control)
                        HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive));
        }
       
}