I’m trying to extend the functionality of the Material instance editor. What I need is to add a button to the Asset dropdown menu, right under the last entry, “Shader Cook Statistics…”.
For the life of me, I can’t figure it out. There are menu extenders and whatnot, but I’ve been going through the source code and non of it makes any sense. There seems to be several ways to extend the menus as well and nothing of what I tried works.
So what is the correct way to add a menu entry to a dropdown menu of MaterialInstanceEditor?
Note that I need to pass the currently edited material instance into the function that will execute when the button is pressed (a very reasonable demand), but that also seems less than straightforward.
Note that I’ve managed to extend the Level editor menus (I’ve added and filled a new dropdown), but the same method just doesn’t work for Material Instance editor.
I’m using UE 4.27.2 and am unable to upgrade.