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 .