Studio plugins are essential for productivity in Studio because they enable you to customize your workflow to best suit your needs. To continue enabling productivity, we are making some improvements to how Studio plugins work. If you are a plugin creator, you may need to update your plugins accordingly.
New Plugin.Unloading Event
Plugins now have an Unloading event which fires right before a plugin is updated, disabled, or uninstalled. This enables a plugin to clean up after itself before its scripts stop running, e.g. to remove unnecessary instances from the DataModel. If a plugin does not clean up properly, users will be forced to close and reopen the place which is a bad user experience.
It is not necessary to clean up plugin-related instances such as PluginButtons or DockWidgetPluginGuis because they will be automatically removed when the plugin is unloaded.
Plugin Scripts Will Stop Running After Unload
Starting April 15, plugin scripts will stop running immediately after the Unloading event fires. Currently, a plugin’s scripts continue running even after that plugin is unloaded. Code listening to the Unloading event must not yield because it will be aborted before it finishes executing. Please update your plugins now to take this into account.
Let us know if you have any questions or concerns about this update! For more information about developing plugins, see our Intro to Plugins article.