I’m developing a plugin for Optitrack that have a tab to interface the server. When I register my tab-spawner using FGlobalTabmanager it works as expected but the tab is not dockable into the Level Editor. Instead when I use FLevelEditorMoudule the tab is dockable like the ContentBrowser tab but it also generates two entries for the tab inside the “Window” menu. Why do this happen? How can I control whether or not generate these menus?
Are you adding a MenuEntry using MenuExtender somewhere in your code? Maybe youre adding one entry by yourself and LevelEditorModule adds another one when you register your tab spawner?
Nope, this is pretty much all the code that initializes the plugin module. If I comment the highlighted block of code it does not generate the menu anymore. I’ve added a link to the image with better readability.
I see. I just dont get it why you’re binding function that registers tab spawner to level editor’s tab spawner OnChanged event. Most likely it gets called twice.
Try to register your tab spawner only once, during plugin startup like this:
LevelEditorModule.GetLevelEditorTabManager()->RegisterTabSpawner(…)
Because at this point the LevelEditorModule.GetLevelEditorTabManager() returns a nullptr. The tabmanager is not ready yet, that’s why I have to use the event.
And no, it’s called just once. I’ve set a breakpoint and it stops only once. I’m trying to understand what happens when I register the tabspawner. And why it doesn’t happen when I use the global tab manager.
Nope, I still get the same effect. It works and I get a dockable tab but also the two menu items. Here’s the source code if you’d like to try by yourself Log in with Atlassian account