Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
4
Question by Gua · Feb 15, 2014 at 04:55 AM · editorobjectdeselectquick

Quicky deselect all selected object in Editor

When I'm finished working with object I'd like to deselect it to not make any accidental changes. But it drives me nuts, that such a simple procedure takes extra time. I know 3 ways to deselect a selected objects, but I want to find more faster and simpler method.

  1. Find a sky and click it. Disadvantages: Mostly it takes to much time and changes your working position

  2. Shift + LMB on selected object. Disadvantages: You can click something else and add it to selection and you need to aim at that object which also takes time.

  3. Click on empty space in project section. Disadvantages: The content of opened folder changes, so you still need to aim and if the opened folder is full of assets it getting hard to click at empty space. + My Project tab is on the second monitor, so I need to waste a lot of time on mouse dragging.

I really hope that there is a key combination for deselect or some easyer methods to do this.

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

4 Replies

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

Answer by iDeally · Apr 14, 2018 at 07:09 AM

Create a new .cs script in the "Editor" folder. Then put the following code there:


 using UnityEngine;
 using UnityEditor;     
 public class EditorShortCutKeys : ScriptableObject
 {    
     [MenuItem("GameObject/Deselect all %#D")]
     static void DeselectAll()
     {
         Selection.objects = new Object[0];
     }
 }


Now you can press ctrl + shift + d to deselect all. If you wish to change howkey you should edit a "MenuItem" attribute. More info is here: https://docs.unity3d.com/ScriptReference/MenuItem.html

Comment
Add comment · Show 4 · 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 jjohn8521 · Apr 23, 2018 at 12:21 AM 0
Share

This almost works for iOS. What should i change in this script for "command+shift+D"?

avatar image iDeally jjohn8521 · Apr 23, 2018 at 10:43 PM 0
Share

As I see in docs, you should not change anything. It should work with provided example. Does it not?

avatar image jjohn8521 iDeally · Apr 24, 2018 at 01:06 AM 0
Share

It "mostly" works. The %# does not translate to control+shift though, so I can't figure out how to make a hotkey for it on mac.

Show more comments
avatar image
2

Answer by Acr1m · May 16, 2014 at 09:16 PM

Yeah, this is a really annoying issue because a "Deselect All" command is easily found in most every major software :/

  1. The cleanest and clearest way to deselect things in Unity is by Ctrl+LMB clicking the object in the "Hierarchy Window". (If you double click too fast, it will focus your Scene window on that object, so be careful.)

  2. Another thing you can do is make a new script file and paste in the code found on THIS page. It will put a command in the top menu tabs of Unity, but I don't think it will add a hotkey, so do get too excited :/

Comment
Add comment · Show 1 · 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 rutter · May 16, 2014 at 09:21 PM 1
Share

Both of the linked scripts attempt to register a hotkey (as described in the $$anonymous$$enuItem documentation). One uses "_a", which is just the A key; the other uses "#a" which is Shift+A.

avatar image
2

Answer by maltakereuz · Feb 10, 2018 at 05:37 AM

It's really goes on my nerves, so here my workaround:

  1. Ctrl + Shift + N (in Hierarchy) to create new dummy object

  2. Select it (and only it) with mouse or somehow

  3. Ctrl + Alt + 1 (add it to selection group 1)

  4. Eleminate mercylessy dummy object

  5. Now you can use Ctrl + Shift + 1 to deselect all (technically select nothing or rip dummy more accurate)

not very nice, but better als scrolling out scene to find an empty space to click each time why it can not be just Ctrl + Shift + A? Dear unity dev team...

Comment
Add comment · Show 2 · 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 KosmoDED · Feb 12, 2018 at 01:00 PM 0
Share

Wow. Its working.

avatar image RodrigoSeVeN · Apr 03, 2020 at 01:19 PM 0
Share

A clever solution for a stupid problem. Cheers.

avatar image
2

Answer by KeithGarry · Jan 08 at 03:08 PM

This was added to Unity. Shift+D will now deselect all.
Or Edit -> Deselect All

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

27 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 avatar image avatar image

Related Questions

Where can I learn to do this? 1 Answer

Quick graphics question 2 Answers

Multi-Object Editing not supported 1 Answer

How to scale an object in editor with absolute or percentual values? 2 Answers

Unity API for checking if an object was modified 3 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