I have a plugin that assigns attributes to particular objects and places scripts. Also, it deletes them if the developer wants to. However, I have a problem when deleting those stuff via the uninstallation of the plugin.
There already exists an event (plugin.Unloading), and it gets fired when the plugin gets disabled, uninstalled, or the place is going to close. The only problem is that the event gets fired when Studio closes. To detect when Studio is closing, if you are not using Team Create, DataModel:BindToClose handles it. On the other hand, if you are using the feature DataModel.OnClose, which is a deprecated member, does the same job.
DataModel.OnClose is the only reliable way to handle it with Team Create enabled. Are there any methods I can switch to?