If you try to create a plugin menu after you have called plugin:CreateDockWidgetPluginGui
the plugin menu will never show.
Below is a test plugin I made to demonstrate.
Repro
- Install the test plugin included below
- Activate the plugin by clicking on the Test Editor Plugin button on the plugins toolbar
- Press the Menu 2 button.
- Observe that the menu doesn’t show
- Press Menu 1 button
- Observe that this menu does show.
Menu 1 will show because it is initialized before the widget is. Menu 2 won’t because it is done after, but if you move the code before the widget initialization it will work fine.
TestPlugin.rbxmx (11.8 KB)
Not sure if this is intended behaviour as I couldn’t find anything on the wiki about this.
Note, that due to this bug: PluginMenus don't display after updating/refreshing the plugin any changes you make to the test plugin to see the effect on the menu will require restarting studio.
This started happening for me today ( I had only just added the widget code to my plugin ) and happens in Studio 100% of the time.
Thanks!