I’ve got a custom menu item for, say, SpriteRenderers.
[MenuItem("CONTEXT/SpriteRenderer/My script")]
private static void ReplaceThisSpriteRenderer() {
Debug.Log("okee dokee");
return;
}
As is, this works properly, with an entry labeled “My script” at the bottom of the menu when right-clicking on a SpriteRenderer in the inspector.
However, I’d like to put it in a subfolder within that context menu, and so I change the MenuItem parameter to
"CONTEXT/SpriteRenderer/Foo/My script"
In this case, when I right-click on a SpriteRenderer, I can see “Foo” at the bottom of the list, but it’s greyed out. Is this by design – to keep these menus flat – or is there a way to have “sub-menus” in these contexts?
