How do you conditionally hide some enum values in custom inspector?
I have two enums.
The first is PrimaryColor which can be "Red, Yellow, or Blue"
The second is TertiaryColor which can be "Red, Magenta, Purple, Violet, Blue, etc"
I want my custom inspector to show only a subset of possible values to choose for the second enum based on the value of the first enum. So if it was Blue, I would want the user to be able to choose from "purple, violet, teal, magenta, blue," but not red/orange/etc.
I found that there is an option in the custom inspector "checkEnabled" that sounds like it would be perfect for this:
https://docs.unity3d.com/ScriptReference/EditorGUILayout.EnumPopup.html
However I'm not sure how to go about making or using the parameter that it needs.
Could anyone give me an example on how to go about using the checkEnabled field of EnumPopUp to do this?
I would also like to know how to achieve this.