Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by eshan-mathur · Jul 09, 2015 at 10:43 PM · selectionscene view

Can't Select GameObjects Under UI In Scene View

I have a bunch of sprites and a UI panel to provide a background color. In the scene view, I can't select the sprites because the focus always goes to the UI panel. This is true regardless of sorting laye, regardless of Z position, and regardless of order in the hierarchy. How can I give selection priority to the game objects I care about?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by instruct9r · Jul 09, 2015 at 11:27 PM

UI allways have a bigger priority in the Scene view. Go to Layers and deactivate the UI, if you want to work on the scene objects.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image eshan-mathur · Jul 10, 2015 at 08:48 PM 1
Share

Bleh. Seems like a pretty big pain the butt to me! I wonder if there's custom selection code you could write to ignore certain layers.

avatar image instruct9r · Jul 10, 2015 at 10:05 PM 0
Share

Not that i know. If somebody else, knows another way of ignoring the UI...

avatar image Thorny2000 · Jul 10, 2015 at 10:05 PM 0
Share

Try this:- $$anonymous$$ake an empty gameobject, make your canvas the child of that gameobject. $$anonymous$$ove the gameobject somewhere out the way in your scene. Add a script to the gameobject that simply sets its position back to 0,0,0 so when you run it is in the correct place.

avatar image eshan-mathur · Jul 10, 2015 at 10:56 PM 0
Share

The problem I'm having is specifically selecting objects during play mode. All of my stuff (game objects, UI, etc.) is instantiated when I hit play.

avatar image eshan-mathur · Jul 13, 2015 at 01:16 AM 0
Share

Yeah, that's probably the best solution. Thanks. If you want to mark it as a separate answer, I'd be happy to give credit to that one as it doesn't require turning off UI visibility in the editor.

avatar image
2

Answer by Thorny2000 · Jul 09, 2015 at 11:39 PM

Open the Layers drop down top right, click the eye icon on the UI layer to disable it


disable-ui-layer.jpg (43.5 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Thorny2000 · Jul 11, 2015 at 12:19 AM

OK, do what I said before to move the UI in the scene (parent it with an object and move it). Now add a second camera and make that the GUI camera (use the culling mask setting on both your cameras - one is game, one is UI).

Now your GUI should be somewhere way off in a corner and you can edit in the scene without clicking it.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by _geo__ · Jun 20, 2019 at 10:37 AM

I know it's a fairly old question but this has been bugging me and my colleagues for ages too. To solve it we have created a plugin which modifies the selection in the scene view. It can ignore ui elements by name (transparent ui elements are click-through by default).

In the image below you can see how to ignore a specific element. I have named it "ui-panel-background" as a reference to @eshan-mathur s original question.

alt text

Link to "Smart Ui Selection": https://assetstore.unity.com/packages/tools/gui/smart-ui-selection-unity-editor-124328

@mods: I know it's an old question and that it might be considered a "plug" but I think it provides a not yet given solution to eshan-mathurs problem and may be beneficial for all readers. If you deem it unworthy as an answer, just remove it, no hard feelings :-)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Xarbrough · Sep 28, 2020 at 04:12 PM

After a few years of experimentation, the solution my team settled on was a context popup that displays a list of GameObjects under the mouse in the scene view. This is similar to the way Photoshop, Blender, and other graphic software handle overlapping elements. To implement this yourself, you can use Unity's API HandleUtility.PickGameObject. But I'm also maintaining a supported version myself: https://assetstore.unity.com/packages/slug/179537


Selection Utility Popup Window


selectionutility.png (7.9 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Scene View - Click selects wrong object?! 4 Answers

Access Scene View Selection Rectangle 0 Answers

Selecting custom game objects in Scene view window. 1 Answer

How can I get info on object in scene view without selecting it? 0 Answers

Character Selection 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges