L
L
LittleBob2021-08-26 20:17:59
Unity
LittleBob, 2021-08-26 20:17:59

How to resize animation based on screen resolution in unity2d?

I made a simple animation from 10 png images, throwing them on the stage. The animation object has three components: Rect Transform, Sprite Renderer and Animator. Everything works, but the problem is that the animation does not change according to the screen resolution. Previously, I just had a picture and I could attach it to a Canvas, the dimensions of which change depending on the resolution. But it doesn't work that way with animation, it's just cut off. I've been looking for a solution for several hours now, can you tell me how to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d1msk1y, 2021-08-27
@d1msk1y

In the canvas settings, set Scale With Screen Size. This should solve all the problems regarding the aspect ratio of the display and the interface. By the way, using a sprite renderer in the canvas is not a good idea, better use Image
6128031a81377139038327.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question