Replies: 2 comments
-
See also: See there for existing solutions |
Beta Was this translation helpful? Give feedback.
0 replies
-
Unless the order of the values is absolutely essential, I'm pretty sure using enum-keyed dictionaries not only solves this problem but also makes the rest of the code cleaner. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My problem: I have an enum for character states and an array for movement speeds for each state.
I want the array to be editable in Node Inspector. Like this:
Now the problem is that the editor shows
and I need to remember that 0 is idle, 1 is walk and so on. It would be much better if I could assign names for the array indices.
My proposal is to add
@export_array
.Now the Node Inspector would show:
Rules:
Beta Was this translation helpful? Give feedback.
All reactions