Some of my objects make dynamically created materials specifically for them when they have been created in the editor. I want to manage these resources and have them be removed along with the game object that necessitated them if the user decides to delete that game object.
However, I do NOT want the materials removed just because the user entered Play mode in the editor and then returned to edit mode. In this case the game object is essentially destroyed and reconstructed and it seems there is nothing that will let me know that it is the system destroying the object and not a user, and that the materials are still needed.