#Looping through enums

1 messages · Page 1 of 1 (latest)

magic dirge
#

Its there a way for the to add the enum values to a dropdown in unity?

steady mesa
#

You can get an enum's raw values using System.Enum.GetValues, and its names as text using System.Enum.GetNames
But this seems like an XY-Problem. After all, Unity already has EditorGUILayout.Popup, which is used to represent an enum.

magic dirge
#

ooh i get it

#

tysm!