Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Issue when transitioning between screens via scale

Discussion in 'UGUI & TextMesh Pro' started by Yarbrough8, Oct 12, 2014.

  1. Yarbrough8

    Yarbrough8

    Joined:
    Sep 19, 2013
    Posts:
    14
    I've been following the new manual How To "Creating Screen Transitions" and ran into a problem, when I wanted to change the property that's being transitioned.

    Here's what the tutorial says in short: Create a single-keyframe animation for the start position and another single-keyframe animation for the end position. Use the Animator transition to blend between the two states. This works fine when I go from Alpha 0 to Alpha 1 or when I use the Rect Transform Anchors from one position to another. The Animator transition interpolates nicely between the values.

    However, when I try to do the same thing with the Rect Transform Size of my screen element, there is no interpolation. It just jumps from 0 to 1. Why doesn't the Animator transition blend between the size as it does with alpha?

    (As an alternative I can create two complete animations with two keyframes each, which make the size interpolation possible, but it just seems like a nicer solution to only have to define two states and then use the Animator transition to handle the actual timing.)

    Thank you!
     
  2. Damasch

    Damasch

    Joined:
    Aug 28, 2014
    Posts:
    4
    I had to experience the same issue.
    I don't know why it doesn't blend like expected, but for me it worked when I replaced the 0 scale by a very small value.
    For example in the first single-keyframe animation the Rect Transform.Scale would have a value of 0.001 and in the second one it would be 1.

    Hope I could help at least a little!
     
  3. Yarbrough8

    Yarbrough8

    Joined:
    Sep 19, 2013
    Posts:
    14
    Thank you for the reply! Setting one of the keyframe animations to 0.001 scale worked. I had the correct interpolation via Animator transition.

    So is this a bug or maybe a missing feature, to tell the user, that he can't put in a zero scale? I know that zero scale doesn't actually make sense, so maybe it's a math problem, but then at least unity shouldn't let me put in numbers that cause problems.
     
  4. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,870
    Please file a bug report with repro steps and repro project. Thanks!
     
  5. Yarbrough8

    Yarbrough8

    Joined:
    Sep 19, 2013
    Posts:
    14
    I built a nice testing project and submitted it.