Skip to content
hannes edited this page Jul 19, 2023 · 9 revisions

startup

load UniMenu on startup with init_unreal.py

parent menus

to parent your menu to the main menu:

parent_path = "LevelEditor.MainMenu"

to parent your menu to the context menu: (this might error if you haven't yet opened the context menu on asset right click)

parent_path = "ContentBrowser.AssetContextMenu"

Icons

default icons

style_names can be found here ...\Engine\Source\Editor\EditorStyle\Private\SlateEditorStyle.cpp - look for the name here

# e.g. Set( "BlueprintEditor.AddNewMacroDeclaration", new IMAGE_BRUSH( "Icons/icon_Blueprint_AddMacro_40px", Icon40x40) );
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^         <--         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
entry.set_icon("EditorStyle", style_name=self.icon)

We support this, but unclear how.

  • todo add sample

No documentation on unreal docs for unreal.ToolMenuEntry.add_icon() Believe it relates too ScriptSlateIcon Discussing on the forum

custom icons

it is not possible to register custom icons with Python, can only use the built-in icons Icon's are here ...\Engine\Content\Editor\Slate\Icons - look for the icon name here

TODO, figure out how to

Clone this wiki locally