- Home /
Update a texture at runtime using UV
Hello,
I have created a small script that procedurally creates a tilemap. Each tile has 4 vertices and 4 uv values, wich are then used to find a tile in an atlas.
Now, I'd like to change the uv values of a particular tile at runtime, so i can change the texture on that tile. Is it possible? I have tried changing the values in the uv array but that didn't work, is there something else i have to do? Do i have to rebuild the whole mesh to do it?
Thanks in advance!
I actually found the answer. Turns out the uv array you're trying to change is a deep copy of the actual uv array. (Why? I dunno). But the answer's explained fully here:
http://answers.unity3d.com/questions/855637/mesh-uvs-wont-change-positions.html
Your answer
Follow this Question
Related Questions
uv Tiling y error 2 Answers
Correctly applying materials to procedural meshes 1 Answer
Procedural Mesh UV problem 0 Answers
need guide in uv texture 0 Answers
Streched texture only on x axis of procedural generated mesh 0 Answers