Animating ui object & panel positions when using Canvas Scalar

Hey.
I’m trying to make a responsive game UI by using Canvas Scalar component.
However it doesn’t seem to play very nicely when using Mecanim to animate the position of RectTransform objects on my UI.

As you know having the canvas scalar component means the size of objects on the canvas change dynamically dependent on the device resolution if their min/max anchor are separated.

Anyway, I have my UI setup nicely and it’s responding well to devices resolution & aspect ratio changes.
My problem is with animation.

I have a panel eg. Pause Menu that I want it to drop in.
Mecanim animations are fixed so making them work for my reference resolution is fine but as soon as the resolution or aspect ratio changes it all falls to pieces.

I’ve tried animating using anchoredPosition & pivot, these work fine for sliding the panel in for my reference resolution but like I say that’s where it ends. Depending on the change to resolution sometimes the panel isn’t off screen completely, sometimes it overshoots where it should be.

Basically does anyone know how to you can make Mecanim animations that adjust RectTransform positions play nicely with device resolution changes when using canvas scalar?

Thanks

never done this… but just wondering if instead of using the Unity Animations/Animator… if one of the Tweening Assets would be more forgiving? Dont hate me! :[

Hey it’s a valid suggestion. I do use itween on the project but I was hoping to avoid code for ui animation & use mecanim so my ux designer can work on them.

I see. :slight_smile:
Yea, for it to be easier to use for Designers, you would have to make a custom editor, with Tweening points (GameObject’s) and a sort of callback that updates its Progress in percentages 0 to 1… and use that progress callback to Move, Size/Scale, Rotate, or color Tint, etc…

Allot of work involved. :stuck_out_tongue: