Mesh Collider Read/Write Enabled Error

Hey all. I’m following this tutorial on how to make a hex grid, but I’m having two issues.

  1. I can’t get a raycast to register a hit on my mesh collider unless I disable and then enable it in the editor after hitting play. And even then, it only registers a single hit before throwing an error and then not registering another hit unless I disable and enable the mesh collider again.

  2. I get the following error after enabling the mesh collider and clicking on the mesh:

“This Mesh Collider is attached to GameObject at path ‘Hex Grid/Hex Mesh’ with Mesh ‘Hex Mesh’ in Scene ‘SampleScene’ but doesn’t have Read/Write enabled. Only colliders that have default cooking options, are not scaled non-uniformly, and their meshes are not marked dirty can leave this disabled.”

This mesh is created via a script.

Any ideas?