Not allowed to access vertices on mesh 'Combined Mesh (root: scene) Instance'

Hi,

I’m running into this error:
Not allowed to access vertices on mesh ‘Combined Mesh (root: scene) Instance’
UnityEngine.Mesh:get_vertices()
and :
Not allowed to access uv on mesh ‘Combined Mesh (root: scene) Instance’
UnityEngine.Mesh:get_uv()
and :
Not allowed to call GetTriangles() on mesh ‘Combined Mesh (root: scene) Instance’
UnityEngine.Mesh:GetTriangles(Int32)

It happens when I serialize multiple GameObjects to xml.
When I do the objects one by one, the error doesn’t occur.
I have no idea what is causing it.
If someone has an idea, please share.

This happens when I mark an object as static.

1 Like

You can’t access the mesh of static objects. That would negate the purpose of having them marked static

3 Likes