I have a data type called
Action in my game, which has three attributes:
public class Action
public string methodName = "";
public object parameter = null;
public int frame;
I want to be able to edit the values of these from the inspector to help speed up my development process. I can freely edit
frame. However, because the
parameter field is an object, it can’t be displayed in the inspector. All I would like the inspector to do for
Action is to go down a list of types (
Action, etc.) and display it based on if it matches anything, otherwise, not display at all. (If it’s an
int, use Unity’s default behavior for drawing an
I’ve done some digging around and things like CustomEditor and PropertyDrawer look promising, but I haven’t been able to get anything figured out yet. Has anyone been able to work through this?
Thanks in advance.