- Home /
Using keys to change Inspector enums
In general, Unity does a great job supporting keyboard-only to use the Inspector, including for scripts. Tab and arrow keys work the usual way; can zoom through an array, use leftRight arrow to expand/close items ... never have to touch the mouse.
But, when I tab or arrow to an enum, is there any way to use keys to open it, or cycle through items?
I'm thinking of a user-coded enum, but I guess it would be the same for a built-in, like TextAlign.
Enter or L/R arrows, maybe with some modifiers, seem like candidates (but all I can do with those is minimize my windows. But I'm using a Mac, and the modifier keys still feel weird.) I assume a custom Inspector script could do something, but I'm thinking about those cases where the standard Inspector is fine, and you just wanted to toss in an enum.
You mean convert enum variable to int and use it to iterate through it?
Not a coding question. I'm asking for an Inspector shortcut, to avoid having to click on Inspector enums.
For example, with an Inspector Vector3, you can open/fold by clicking the little arrow; but you can also use right and left arrow keys, without having to reach for the mouse.
Answer by Owen-Reynolds · Feb 24, 2017 at 09:21 PM
Arrow over to the enum in the Inspector and press ENTER. The enum dropdown pops up. You can then up/down arrow through it as normal, and close with another ENTER.
Allows 100% use of keys-only to navigate and change Inspector enums.
I'm 99.9% sure this was not the case back when I asked this (since I specifically mentioned the Enter key,) so nice job adding this Unity team.
Your answer

Follow this Question
Related Questions
(Inspector) Change Header Color 0 Answers
Custom Display for system.object Editor 1 Answer
Why inpector keeps methods assigned when changed from public to private 2 Answers
Select a type from the inspector 0 Answers
Loss of GO selection 2 Answers