How to get vertex color before assigning color via Mesh.colors?

I have a mesh that has vertex colors already painted in (from Maya). I can confirm they are there using a shader to see vertex color. Is there a way to sample those vertex colors from a script using the Mesh.colors api? It seems like that array of colors is empty until I assign it a new array of colors.

Same question worded another way: I want to get the vertex colors of a mesh via script, as the mesh currently is. I don’t want to assign a new array of colors (which would override the current vertex colors) in order to sample them. Is there a way to do this?

I am also having this issue but only for builds (debug works fine), the colours work when the mesh is put directly into the scene but if I instanciate it in real-time the colour data seems to be empty. I’m using Unity 2020.1.0b2, but I’ve had this issue in earlier versions.
I get around it by manually placing all my meshes in the scene with a material that uses vertex colours then I delete them. However this seems like really ugly hack especially as I build more and more models.

If the mesh is imported in Unity, make sure you mark it as readable in the inspector. You can check if a mesh is readable with the isReadable property.