Hello,
I created a polygon shape collider system for a 2D physics engine in Unity
and I use a Mesh to create the polygon like:
public Mesh mesh; //Use Inspector to assign mesh
void Start(){
....
(using the mesh's vertices to intilize the polygon.)
}
and it works fine ,
but when I saving scene
Unity3D gives me a message
“Cleaning up leaked objects in scene since no game object, component or manager is referencing them
Mesh has been leaked 22 times.”
but I dont want to use MeshFilter because I use it to render a 2D image.
so how can I solve this problem?