Search Unity

Disable selection rectangle in Editor

Discussion in 'Editor & General Support' started by Brightori, Jan 23, 2020.

  1. Brightori

    Brightori

    Joined:
    Sep 15, 2017
    Posts:
    64
    Good afternoon, I am writing my own editor toolkit for working with objects of the world, and in some cases I want to disable the selection rectangle (when i click mouse button and drag) How I can do this?
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Code (CSharp):
    1. public void OnSceneGUI()
    2. {
    3.     HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive));
    4. }
    A bit late, but it could help someone else :p
     
    Brightori likes this.