- Home /
C# Edit enum values in inspector
Hi,
I have a custom editorwindow and within the settings I let users to choose a category for the specific object.
I want to add this categories from an enum as they will be used elsewhere in the games as well. Is it possible to edit enums within the inspector? or do I have to make a custom editor for that too?
Answer by Adam-Mechtley · Mar 07, 2017 at 01:18 PM
Yes you can either use EditorGUI.EnumPopup or simply use EditorGUI.PropertyField with a serialized enum field.
I know how to display the enums. I want a way to edit the enum itself within the inspector, so i can add or remove values from it.
Understood. If you're actually wanting to edit the hard-coded enum values/names there is no built-in way to do this from the Editor.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
c# enum wont show in inspector 3 Answers
Cannot Implicitly convert to bool problem? 1 Answer
Array to match Enum in Inspector 1 Answer
Multiple Cars not working 1 Answer