0
\$\begingroup\$

When I'm done with moving and rotating gameObjects in a Unity scene, I want to deselect everything to not accidentally change it. How?

In some applications ESC key does the trick, in others 'D' (deselect) comes to rescue. But I don't know any remedy in Unity. My workaround is that I click somewhere in the Project View (I don't like this approach because it brings up the inspector for that asset).

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

You could click on a blank area in the scene view, or in the hierarchy, or if you really really want a keyboard shortcut you could add a custom editor script: (Untested)

using UnityEngine; using UnityEditor; static class DeselectEverything() { [MenuItem("Edit/Select None _d")] //alternatively MenuItem("Edit/Select None _ESC")] although it may be _ESCAPE static void DoSelectNothing() { Selection.objects = new Object[0]; } } 

You can take look at the Unity documentation to see more about how to use MenuItem, specifically how to organize the item within the Edit menu and how to give it a different keyboard shortcut.

\$\endgroup\$
2
\$\begingroup\$

The hotkey to deselect all GameObjects in a Unity Scene is

Shift + D

Also you could use the action from the menu Edit then choose Deselect All.

Unity 2020.3.16f1

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.