I have made a minimal project that displays the issue. In unity 6 preview my player animations work when they run in the editor but they don’t when they build and run.
to see the project and try it here it is. GitHub - jodle001/unity6_preview_animation_bug
I did find out that it works fine if the animations all come from the same sprite sheet png then they will load properly. But this can be really difficult to manage if you have a lot of animations, so this isn’t really a fix.
I did submit a bug report and the response stated that this bug is known and should be fixed with 6000.0.13f1 when that drops. Assuming this issue is the same issue that they had already known about.
I can confirm that this happens to me too, I have an animated SpriteRenderer that uses sprites from a sprite atlas, it works fine in the editor, but in a build it either doesn’t shows up any of the sprites or just displays the entire sprite atlas as if it was a single sprite.
Exactly faced this problem Now i believe there is no other choice than updating my engine… Can you give us the bug state status website?
For anyone who encounters this issue, there is a small hack to use if you want to continue visual tests until the bug goes away.
- If you put the Animator directly into the scene, it will get broken.
- If you instantiate a Prefab that includes an Animator inside any of the initialization methods, it will get broken.
Instead, you will need use some kind of one frame delayed prefab instantiation for every SpriteRenderer/Animator that gets broken. It only tested in WebGL though:
private IEnumerator Start()
{
yield return null;
Instantiate();
}