Is it safe to use deprecated members this way?

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?

1 Like

Deprecated means that class is being replaced by an another class that has more functions but however it does same job as deprecated class. Deprecated does not mean that you cannot use it. Using deprecated class in your game will do its own purpose just like a replacement to this deprecated class.