Inspector public property context menu

Hey there,

I’m trying to recreate a context menu by right clicking on any kind of public property showing up in the inspector.

The same kind of menu that you can have by right clicking on a property of an instantiated prefab.

I need it to work on every variable in the inspector so everything “class custom editor” related won’t work for me.

Maybe using something like what unity can do with the [MenuItem] attribute and the “CONTEXT/Class” key words (https://forum.unity3d.com/threads/solved-adding-context-menus-to-game-object.410353/ which is not documented …) that will call a static function where I can work with that context (context that would be the property pointed by the mouse when creating the context menu).

89915-000873.png
Image of the context menu created by right clicking on a property of a Component part of a prefab

Thanks for the help !

I just looked at the same thing. You probably want