Search Unity

Question How to scale textures dynamically?

Discussion in 'General Graphics' started by RyanRavos, Nov 27, 2022.

  1. RyanRavos

    RyanRavos

    Joined:
    Dec 15, 2021
    Posts:
    1
    Hi, I'm new to this and I do have a general question about how to scale textures.

    I have an fbx model or at least some basic stuff like a cube or a sphere and I have a texture I want to draw onto. But that texture should not be static but dynamic. When something happens ingame, I want to change the size of the texture. Maybe I want to change color or something else, too. A way to manipulate textures dynamically but also efficiently.

    There could be many ways to do this but what do you recommend to do?

    Thank you!
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,059
    You can tile and offset UVs quite easily in shader graph (or other shaders). As well as change color.
    Using that you can reference the material of the object and change it via code