- Home /
Question by
Matthew A · Mar 15, 2013 at 11:46 AM ·
meshmeshfiltersharedmesh
Finding sharedMesh users.
I have an editor script that replaces the meshes of selected objects (using Instantiate), before performing modifications. This works fine.
However, later on (when saving the scene) I get a message saying "Mesh has been leaked n times", and that these objects are being cleaned up. While this is not a problem (it's what I want). I'd rather delete the meshes manually myself and not have this error message show up (since despite the message, Unity doesn't actually bother cleaning up the meshes :/ ).
Is it possible to find out whether a sharedMesh has any other users (without having to iterate through every object in the scene) so I can safely destroy it?
Comment