- Home /
Arranging KeyCode type variables in custom editor
hi everyone, I had seen that this question was asked two times and both times it refers to popenum type on EditorGUILayout, but i can't figure how can i use it, here is the case : I have a script that has lots of variables like this :
public KeyCode Idle;
public KeyCode Walking;
public KeyCode Running;
.
.
.
there are some other variables like floats etc that i am building a custom inspector gui for them, now i want to do somthing like this in editor script:
private bool showParams = true;
public override void OnInspectorGUI()
{
showParams = EditorGUILayout.Foldout(showParams, "Show Action Inputs");
if (showParams )
{
// here i want to show all those key code type variables
}
}
now, the question is, how can i implement the keycode variable type in custom editor, it's not enum, and i don't want to convert it to enum because later on in code i'm using it in keydown and other conditions AS keycode. Same goes for variable types of Animation, particle system,Transform, and audio clips. thanks for your help
Your answer
Follow this Question
Related Questions
Unity editor and inspector header 0 Answers
Custom Inspector Variables 1 Answer
How would I go about creating a custom Unity Event in a Custom Unity Editor/Inspector? 0 Answers
Questions Regarding Images in Custom Inspector/Editor 1 Answer
EditorGUI add SortingLayer-like list to custom Editor 1 Answer