- Home /
Is it possible to omit elements of enum in inspector?
Howdy there!
Basically I'd to be able to choose a key in the inspector using:
public var theKey : KeyCode;
But KeyCode gives every possible keyboard option and I'd like to omit a few from the list or only allow certain options to appear. i.e No number values or only include letters A to Z.
I feel like this may not be directly possible, but thought it was worth asking: is it possible?
Thanks very much, Romano
Answer by MakeCodeNow · Jun 23, 2014 at 05:43 PM
As far as I know this is not possible with the standard controls. You might be able to get it with a custom PropertyDrawer, but even then I'm very confident it'll be straightforward.
Your answer
Follow this Question
Related Questions
Integer value casting to KeyCode enum in JS? 3 Answers
Convert String into KeyCode (UnityScript) 0 Answers
Custom conditional enum for controller buttons? 0 Answers
How to set KeyCode with Number for load? C# 1 Answer
Another Error - Enum.Parse 1 Answer