|
I have a simple model that is made from 1 quad. UV1 is mapped to one area of the texture and UV2 is mapped to a different area on the texture. Unity displays the object using UV1. During game play I would like the object to sometimes use UV2 as the texture mapping for this object. How do I tell unity to temporarily use UV2 instead of UV1?
(comments are locked)
|
Note that this will cause a copy of the mesh to be created, and the engine will create a new VBO to put the data into.
(comments are locked)
|
|
Unfortunately this is less trivial than it sounds. It can be done in several ways, for example using a script that sets the mesh.uv to the mesh.uv2 set or using a custom shader that can switch between the meshes. An easier method, assuming you don't have a really weird mapping is instead of using 2 uv sets just use one and use texture positioning to switch to different parts of the texture. To give an example: While I accepted the answer below I think I will end up using your approach. Thanks
Dec 09 '09 at 03:30 PM
ibyte
(comments are locked)
|
