- Home /
Select object in scene problem
I need some help with an interface problem. I have an interior scene with many objects in however when i go to click on an object, the tendacy is for the largest object behind the object i clicked on to become selected (usually the wall or floor), which is making it near impossible for me to select the actual object I want.
For example:
I have a chair in a room up against a wall. I go to click the chair and the wall behind it is selected instead.
With so many objects though its making it very difficult to arange or adjust the obects currently in the scene.
Does anybody have any idea why it is doing this and if there is some workaround to fixing it?
Thanks
I'm dealing with the same thing. I just switched to Unity 5 and it's terrible and annoying !
It works fine on $$anonymous$$ac but on Windows 7 it's a disaster.
I have the same problem so it's not just you. It's driving me crazy.
Answer by Xarbrough · Jul 13, 2015 at 12:25 AM
Unity uses a selection system which prefers certain objects and also has some padding around them to make it easier to select certain things. This should actually be very handy, unless you have a very unlucky configuration of just too many objects.
One solution: Put your objects on Layers. Even if you don't need those logical groups in game, you can use them in the editor, because at the top right there is a drop down which allows you to lock certain layers or make them invisible.
You also might be able to hide certain objects by hiding their Gizmos (Scene view menu tab has a Gizmos button to disable certain types), which is equivalent to toggling a components drop down arrow in the inspector. If you toggle, say, the Camera component on the Main Camera, the selection preference will be lower on that component.
The layer option seemed to work the best.
Still, it seems very weird to me that nobody else seems to have this problem, (i did do a search 1st). Is it not a common problem?
Something I also noticed is the problem only seems to occur after clicking the play button. (and then unclicking play of course). Could this be relevant?
The problem still persists. Thank you for sharing the cause, this helps to get around the problem.
The inability to select objects in Unity drives me bonkers as well.
Blender has a nice feature that overcomes this issue. You can CTRL or ALT (something like that) click an object and it will display a pop-up menu with all of the objects along the Z-plane of the point you clicked. Seems simple enough to implement.
After a couple of years of game development since my original answer, I've actually developed a tool that does just that. $$anonymous$$y solution was to show a list of all GameObjects that are under the mouse when right-clicking in the scene view. Fairly easy to implement for your own use, but I also maintain a stable version on the asset store: https://assetstore.unity.com/packages/slug/179537
Answer by GregoryFenn · Aug 04, 2018 at 11:57 AM
Can't you just select objects from the Scene Heirarchy, rather than the Scene View window? If you can't find the object easily in your heirarchy, you need to tidy-up and organise it, using empty GameObjects as folders and things. E.g., a seperate empty for NPCs, icons, loot, trees and plants, ground, walls etc.
The problem is not about hierarchy organization, it happens even in a empty scene with only 2 boxes, a small one in front of a bigger one, when you click on the smaller box in scene view, unity tend to select the bigger box on the back.
Oh I know, I understand the OP and your solution above. I was just suggesting that it might not be that important an issue when selecting an object in the heiarchy seems to be much easier and more precise than in the scene view anyway. It's up to you of course, I just don't really see the need for selection in the scene view anyway [playing with gizmos, yes, but they pop-up after selection and get mouse-priority].
Answer by CurlyTail · Aug 04, 2018 at 04:19 AM
I recently had the exact same problem like the question described, really annoying, I thought something went wrong with Unity so I uninstall and re-install Unity with no luck, problem remained the same. then I remembered when Unity editor affected by some mystery dark force and acting weird like this, a big chance is there is something wrong with the custom layout, So I change the layout back to any built-in layout ( the drop down menu on the upper right corner ), problem solved. simple and easy. I can select the tiniest rock in the scene without any problem.
This is kinda late since the question was back in 2015, but better late than never I guess. hope this trick could help someone.
Your answer
Follow this Question
Related Questions
How to create an agenda or timetable system? 1 Answer
Script Component to implement interface 1 Answer
Ball delivery system ... back/down swing. 0 Answers
Retrieve Componet as Interface 1 Answer