- Home /
used lerp for animation haha
Button not moving in X axis because of animation
Hello everyone, I have a UI button that has a simple animation: go to the left (X axis). This made the button unmovable (on the X axis) neither through script or through the inspector (out of play mode it works fine). I have also noticed that when the time for the animation to play comes, the button moves to where the animation begins and goes to where it ends. How do I work around this? Thanks for helping.
Line:
gameObject.GetComponent<RectTransform>().anchoredPosition = new Vector2(-235, -550);
Follow this Question
Related Questions
anchoredPosition in mechanim locks my axis 1 Answer
Animate RectTransform anchoredPosition relatively to other RectTransform 0 Answers
UI Elements Move Animation Using iTween 2 Answers
How to animate UI rect transform which works for all resolutions 1 Answer
Reusing SpriteRenderer animations in UI 0 Answers