Search Unity

Bug UI Animations work properly in editor but not in build.

Discussion in 'Animation' started by turtenguin, Sep 2, 2023.

  1. turtenguin


    Jul 14, 2020
    In my project I have a UI menu which consists of five circles which surround a center point. When an object is clicked, the menu opens around it using an animation I have created in Unity. The animation is very simple. Each circle has a keyframe for position (0,0) at time 0, and a keyframe at the end of the animation with the end position.

    The ending keyframes are as follows:
    Circle 1: (20, -40)
    Circle 2: (20, 40)
    Circle 3: (-40, 40)
    Circle 4: (35, 14)
    Circle 5: (35, -14)

    In the editor, the animation works correctly as expected. However, in the build, some of the circles move to the incorrect position. They consistently move to these positions:

    Circle 1: (20, -40) correct
    Circle 2: (20, 40) correct
    Circle 3: (20, 40) incorrect
    Circle 4: (20, 14) incorrect
    Circle 5: (35, -14) correct

    So, essentially, some of the circles are moving to the wrong x position. The circles have other animations internally, but they are all identical, and nothing changes the position of the circles other than this animation. Plus, the animation is running, just two of them are moving to only the wrong x position. Because of this I can't think of any reason for this behavior other than a bug.

    Thanks for your help