Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[4.6.1 - Plugin] Why do FLevelEditorModule::RegisterTabSpawner generates two menu entries for my tab?

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?

Here's a picture that explains the overall situation: (full size) http://i.imgur.com/J7zbXT6.jpg

alt text

Product Version: Not Selected
more ▼

asked Jan 27 '15 at 11:38 AM in C++ Programming

avatar image

85 9 7 17

avatar image szyszek Jan 27 '15 at 12:22 PM


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?

avatar image omigamedev Jan 27 '15 at 01:17 PM

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.

avatar image szyszek Jan 27 '15 at 01:54 PM

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(...)

avatar image omigamedev Jan 27 '15 at 02:07 PM

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.

avatar image szyszek Jan 27 '15 at 02:19 PM

Meh, I didnt notice that you are trying to register tab spawner with GlobalTabManager istead of registering Nomad tab spawner, like this:


This way you can get your tab to be dockable everywhere and by using MenuExtender you can create menu entry under 'Window' menu

avatar image omigamedev Jan 27 '15 at 02:45 PM

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 https://bitbucket.org/omigamedev/ue4_plugintest

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Ok it looks like this is the solution for me, but still it does not answer to the question "why two entries are added to the menu?"

alt text

more ▼

answered Jan 28 '15 at 04:06 PM

avatar image

85 9 7 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This is still an issue in 4.18.3.

Just call RegisterNomadTabSpawner and it gives you 2 entries under windows.

the FTabSpawnerEntry& returned by RegisterTabSpawner() and RegisterNomadTabSpawner() has a method called:


Which can be set to false.

more ▼

answered Mar 13 '18 at 09:08 PM

avatar image

29 1 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question