Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Button transition scaling problem

Discussion in '2D' started by DonTeee, Nov 15, 2019.

  1. DonTeee

    DonTeee

    Joined:
    Aug 7, 2019
    Posts:
    4
    Hello all:

    I am new to Unity.

    I have made two standard UI buttons, each of which has the default button script component that deals with button states and actions to be performed in response to the "On Click" event. For each button, Transition between states is set to "Animation." I have a transition set for each of these buttons to scale up to 1.3 times initial size in the highlighted state. As I click back and forth between these two buttons, this scaling quickly degrades with each click to the point that there is soon no apparent scaling at all.

    I am working on a legacy project authored in Unity 2017.3, so I am sticking with that version. (When I tried to open the project in the 2019 version, I broke multiple features beyond my understanding to fix.)

    Has anyone else encountered this problem?

    Thank you, outstanding Unity community.

    Don
     
  2. DonTeee

    DonTeee

    Joined:
    Aug 7, 2019
    Posts:
    4
    I figured it out. I had some color animation on the normal state of my button. When I put some explicit scaling keyframes (all with a value of 1) in the normal state at the same points in time as the color keyframes, my problem went away. I'm not sure whether I would have had the problem if the normal state had had no keyframes at all. It boils down to the fact that sometimes you can't rely on a default state without keyframes.