Search Unity

Question Animated Scrolling Texture?

Discussion in 'Animation' started by Koaske, Nov 29, 2021.

  1. Koaske

    Koaske

    Joined:
    Mar 30, 2015
    Posts:
    22
    I have a 4-frame animation created with Unity's animator, where I change the sprites of a SpriteRenderer.

    I would like this animation to scroll on an object so that it will horizontally wrap around.

    I know that I can change the material's main texture offset to create the scrolling effect, but Sprite renderer doesn't support changing this. If I use a quad/plane instead, making an animation seems to be trickier, since I can't just change the sprite property, like in the SpriteRenderer, but would have to swap the materials instead, I believe. Feel free to correct me if I'm wrong here.

    Any pointers on what would be the best approach here?