Custom User Window Menu Item

To add a new tool window, you write an extension with imgui code for the editor and to see the tool in the Window menu, you need to add the item with editor.addWindowMenuItem like so:

-- this function will be called by editor when it constructs the Tools menu
local function onWindowMenuItem()
  -- here you show your tool's window or execute the tool operations
  openSomeWindowHere()
end

local function onEditorInitialized()
  -- if your tool extension is experimental, you can specify that, it will be placed in `Experimental` submenu
    local editorExtensionInfo = {
      experimental = true
    }
    -- add an entry in the Window menu
  editor.addWindowMenuItem("My Tool", onWindowMenuItem, editorExtensionInfo)
end

M.onEditorInitialized = onEditorInitialized

For more information about tool windows check the Main Menu and Toolbar API .

Last modified: December 7, 2021

Any further questions?

Join our discord
Our documentation is currently incomplete and undergoing active development. If you have any questions or feedback, please visit this forum thread.