-
Notifications
You must be signed in to change notification settings - Fork 9
Unreal
hannesdelbeke edited this page May 10, 2024
·
9 revisions
load UniMenu on startup with init_unreal.py
- either in your project
- or a better way. in your plugin
content/python
folder
to parent your menu to the main menu, or the tools menu:
parent_path = "LevelEditor.MainMenu"
parent_path = "LevelEditor.MainMenu.Tools"
To parent your menu to the 'asset right-click context-menu': (this might error if you haven't yet opened the context menu on asset right click)
parent_path = "ContentBrowser.AssetContextMenu"
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
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
- might be able to use the resource browser for custom icons
Applications
Dev Docs
Other