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.

Manual Sprite Animation Breaks After Building

Discussion in 'Animation' started by xdeployer, Sep 25, 2022.

  1. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    10
    Hi all. I am manually loading a sprite in a script and then flipping through each slice of the sprite in the Update function. This works fine in the editor however when I build the project the animation breaks. Any ideas why this might be happening?

    BROKEN AFTER BUILDING
    broken.gif


    WORKING IN EDITOR
    working.gif
     
  2. xdeployer

    xdeployer

    Joined:
    Sep 25, 2022
    Posts:
    10
    Ok turns out the sprites are loaded in order when in the editor, but are loaded out of order during build. Instead of just saving the array I am parsing the keys to get the proper index.