Show different enum in inspector based on another value?

I have two enums that hold information. The first is which character you’re selecting and then the second is for equipment.

It looks something like this

public enum Classes {Soldier, Medic};
public enum SoldierEquip{Rocket, Shotgun, Shovel};
public enum MedicEquip{Syringe, Defib, Medkit};

I’m using the inspector to set this information up and I wanted to know if there was any way to make it so that when Soldier is selected as the class that only the soldier equipment shows up as options.

Thanks for any help.

You’ll need to write a custom inspector for that. Displaying properties based on other properties is fairly easy then, just use an if or switch statement to check for the class and then the usual EditorGUI/EditorGUILayout functions to display the property fields needed.

Note that though you don’t show some properties those will still be assigned with e.g. default values from your main script.