I am trying to figure out how to create materials in Unity using different areas of a texture.
So far I’ve found a ton of resources about how to create a material and how to use the shaders, but so far they all use 1 texture as whole.
Imagine to have a building mesh, where the texture has different designs for the building (like a building that is damaged and one that is not); I am trying to create 2 materials, so at runtime, I just have to swap the materials.
Now the easier way is to make 2 textures, make 2 materials and problem solved…but I am trying something different: I would like to use 1 texture atlas and make 2 different materials.
So far I can’t see how can you do this in Unity, since the only parameters that I see available for a material are not able to mark a different area of a texture, but takes a single image.
Is this even possible in Unity? Should I do it in my 3d package?
Thanks in advance.