Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to keep Unity from selecting objects behind the object I click on

Discussion in 'Editor & General Support' started by idovingx, Jan 2, 2016.

  1. idovingx

    idovingx

    Joined:
    Jul 16, 2014
    Posts:
    8
    Very frequently when I'm in the editor and I try to click on an object, for instance a wall, Unity will select the object BEHIND what I'm trying to click, even when it's quite far behind. Is there a setting somewhere I can change to make Unity more accurately select the foreground object I'm clicking? I feel like I must be missing something obvious.

    I'm aware that I can lock layers to keep them from being selectable in the editor, but would prefer not to have to constantly lock/unlock layers to fix the issue. Also worth mentioning that this issue seems much worse in Unity 5 than it was in Unity 4.

    Thanks
     
  2. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    Just click again it should cycle through to what you want or change the viewing angle
     
  3. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,727
    This has been an issue for about 6 months now. I'm not sure why Unity can't seem to fix this problem. They keep closing the bug reports as "fixed", when it isn't fixed. It is very problematic when you have something like planes close to other meshes. I have planes for wall tiles next to a wall. I've had to restart Unity 10 times today all ready because it will suddenly not let me select the planes no matter what I do. I have hundreds of these in my scene, so I cannot easily navigate through the hierarchy to find the one that I want. Unity 5.2.3
     
  4. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    A canvas or two in your scene makes for annoying clickbait too
     
    ArachnidAnimal likes this.
  5. idovingx

    idovingx

    Joined:
    Jul 16, 2014
    Posts:
    8
    Dang, I was hoping there was an actual fix. I spend a frustrating amount of time clicking and re-clicking to select the object I need.

    @tawdry, Unfortunately changing the viewing angle doesn't always work, and still, it's an issue if I have to change the viewing angle to keep from selecting a wall behind the object on which I'm clicking.
     
  6. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    926
    just a shot in the dark, but maybe re-focussing an object (tap 'f' with an object selected) could help. It did in earlier blender versions; i think it reset the depth or clipping planes or something like that, which i believe went crazy from too much mouse-zooming. And i remember it fixing certain z-flickering problems in Unity too.
     
  7. idovingx

    idovingx

    Joined:
    Jul 16, 2014
    Posts:
    8
    @ValooFX in testing that briefly, it does seem to help a bit, unfortunately the problem still mostly occurs.
     
  8. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    i have the same problem and sometimes it really get on my nerves XD

    I have an object taking half the screen in front of me and all it does is selecting another one far behind...

    so i keep turning the camera around in strange angles until i can select the one i want but it's getting an art by itself to do that cause there is always another object behind that Unity will prefer to select for me...
     
  9. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    Also Unity will cycle through most object usually but when you want to select several objects by holding shift that doesnt help (it doesnt cycle anymore just select / unselect 1 object)
     
  10. Pix10

    Pix10

    Joined:
    Jul 21, 2012
    Posts:
    850
    Layer_Lock.png

    :)

    This isn't always ideal of course as you don't want to keep putting things on layers that don't belong on them, just for selecting things.

    Unity's viewport has a lot of shortcomings, object picking unfortunately is just the tip of the iceberg.

    Requests for improvement go *way* back.
     
    Walter_Hulsebos likes this.
  11. idovingx

    idovingx

    Joined:
    Jul 16, 2014
    Posts:
    8
    Any suggestions on contacting Unity about this? The issue is significantly affecting my workflow, adding probably 20% extra time and lots of annoyance.
     
  12. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    still a problem in 5.3.5, keep selecting objects behind. Never had this problem in other 3d soft such as Blender or Unreal 4 :/
     
  13. justinspice

    justinspice

    Joined:
    Jul 27, 2016
    Posts:
    12
    YES GOD THIS DRIVES ME MAD!!! ANY FIXES PLEASE?!?!?! I have the same problem Elzean does. if you want to shift select stuff in the scene... well you are basically out of luck.
     
    Walter_Hulsebos likes this.
  14. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,771
    Has this got worse lately? I just can't select anything in the scene view at all anymore.
     
  15. sosadnaman2

    sosadnaman2

    Joined:
    Nov 17, 2020
    Posts:
    1
    still exist in version 2019.4.21
     
    Last edited: Apr 6, 2021
    Walter_Hulsebos and OniZeuS like this.
  16. FireHawkX

    FireHawkX

    Joined:
    Apr 26, 2016
    Posts:
    28
    Was searching for a solution for Unity 2021.1.16f1... because my scene has gotten so big its driving me insane...

    FIRST google result is this thread dating back from 2016!!

    How is there not a simpler way to actually select the object closest to the camera?!?
     
  17. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Noboby care in unity. Still not fixed. They probably think this is not bug, but feature.
     
  18. mborys

    mborys

    Joined:
    Jun 7, 2021
    Posts:
    1
    The problem may occur when Physics Debugger window is opened.
     
  19. Walter_Hulsebos

    Walter_Hulsebos

    Joined:
    Aug 27, 2015
    Posts:
    26
    Absolutely ridiculous.
    Gross incompetence.