Hi, I want to change the plane texture to an opaque seamless texture of my choice, but If I change the material only its base color is visible, not the texture. Does this API work with plane materials differently or I'm missing something?
If I see it right there are no uv’s Generated for the plane. That is why you do not see a texture. Should be easily done by using the xz position as uv data.
It worked! I used the code from the Unity example and pasted it at the end of the method GenerateMesh. The texture moves when new vertices are added to the plane, but for the moment it is enough for me. If anyone needs it: Code (CSharp): Vector3[] vertices = mesh.vertices; Vector2[] uvs = new Vector2[vertices.Length]; for (int i = 0; i < uvs.Length; i++) { uvs[i] = new Vector2(vertices[i].x, vertices[i].z); } mesh.uv = uvs;
Thanks. Will try that too. Maybe would be good check the arcore code. I think they had a plane texture in their sample.
UVs are now generated in 1.0.0-preview.13 of ARFoundation. To update, go to Window > Package Manager > AR Foundation > Update to 1.0.0-preview.13