Search Unity

Don't let mouse click select objects

Discussion in 'Immediate Mode GUI (IMGUI)' started by Morseton, Jun 19, 2016.

  1. Morseton

    Morseton

    Joined:
    Jan 15, 2016
    Posts:
    90
    How can I not let mouse clicking on scene select objects?

    I want to make a texture paint thing, and it's important that the object with the OnSceneView is always selected and that the mouse click doesn't select any other objects when we are painting.


    Thanks for your time!
     
  2. dutchkiller2000

    dutchkiller2000

    Joined:
    May 13, 2016
    Posts:
    121
    i dont know the fix but maybe you can hide the cursor with Screen.showCursir = false;
     
  3. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    377
    Use
    Code (CSharp):
    1. HandleUtility.AddDefaultControl(control_id);
    before your
    Code (CSharp):
    1. Physics.Raycast
    call.
     
    Last edited: Jul 28, 2016
    IzzySoft likes this.
  4. IzzySoft

    IzzySoft

    Joined:
    Feb 11, 2013
    Posts:
    376