Hi,
I’m creating a few procedural meshes in the editor with a custom EditorWindow.
Each mesh is assigned vertices, normals, tangents, colors, uv and uv2.
The meshes are created using the sharedMesh member of the gameobjects MeshFilter.
The first time I edit a gameobject that’s missing a sharedMesh, a new mesh is created and then assigned to sharedMesh.
So the meshes are unique, and not shared between the gameobjects.
Everything is working great for one gameobject, but if I add another object and create a mesh, the UV channel of both gameobjects meshes go haywire both in the editor and in play-mode IF they have the same material.
I can’t figure out why? If I duplicate the material and assign the duplicate to one of the gameobjects, the problems go away.
I really need to know if the properties for procedural meshes (normals, colors and so on) are somehow shared between different meshes if they share the same material?
If so, why is there no problem with non-procedural meshes sharing the same material and what do I have to do to avoid the problems?
Thanks in advance!
Anders