GenericMenu with icons?

Is it possible to have icons in a GenericMenu? Consider the following code:

    GenericMenu menu = new GenericMenu();
    menu.AddItem(new GUIContent("1" , someTex), false, SomeMethod, someObject);

and someTex is a Texture2d. It does not draw an icon beside the menu item.

100885-000730.png

Is it possible to draw icons?

This is not possible in Unity (as of 2018.3.0f2).

The GUIContent you pass to the AddItem is stored internally, but the method that draws the menu GenericMenu.ObjectContextDropDown only uses GUIContent.text. In other words, Unity ignores texture and tooltip values. Even if one were to try reflection, EditorUtility.DisplayObjectContextPopupMenuWithExtraItems only takes strings for values.