I have this panel with an image off to the side of my screen, and when a collection happens I want it to animate onto screen and slide off again. I have the animation up and running and it all works but the coming in from off screen changes. I develop on two different computers and sometimes when i start the game the UI panel is on screen already. On the other PC its off screen. If I move the dev scene windows around it changes. How can i start the panel to the right edge of the screen and make sure the animation (a simple move to the left then to the right off scene again) happens consistently anytime. I am not even sure what code/ or screenshots to post.
The problem might be the different resolutions.
A easy way to work around that is to animate the anchor instead of the actual position.
That way its allways a percentage of the screen size and not a fixed pixel amount.
I am a bit new as to animating UI elements like this. I am showing the animation here (see image) It Says the anchored position is what is changing. If I have that panel off screen it changes each time as to the start and I have to even reset the animations it seems.
Usually if you have different resolutions, and you want it to stay on the side (offscreen) you’ll want to anchor it on that side. The other thing you’ll need to do I believe is also check your canvas. You have a canvas scaler on the canvas. Setting it to scale with screen size and setting a reference resolution plus a match will also be required for it to “scale” depending on your resolution on different devices or monitors/computers.
