Hi
I have a custom editor script that needs to have support to change keys for specific things. But my problem is that I don’t know how. I get that you are supposed to use EnumPopup but I can’t understand in what way I should use it since no one actually says how you are going to use it.
So this is my code that I tested with.
script.movementSettings.runKey = EditorGUILayout.EnumPopup("Run Key", script.movementSettings.runKey);
Now this code doesn’t work. I get a error asking if I am missing a cast. If I add a cast in the end like “as KeyCode;” I just get another error. So how am I supposed to do this?
Any help is greatly appreciated!
Thanks!