Is it possible to play an animation like looping through a spritesheet or multiple sprites using ui toolkit?
You can if you assign a texture to the “image” property and then update the “sourceRect” to show only a part of the sprite sheet (i.e. the sprite you want to show now). You could also swap out the whole image every N frames if your sprites are not in an atlas.
Hey, hi. Thanks for your reply.
I should do this using the schedule property? In this case for the best case scenario I should have a sprite with all the frames the same size, I guess.
Best hook into the update loop and do it there. Yes, equally spaced sprites will make the uv calculations easier but it’s not strictly necessary.