Why are my sprites glitching and flashing in build?
Hey, all! Apologize if there's a more succinct solution to this somewhere on the internet but I simply could not find one.
So I have a project I'm working on and the sprites seem to be flashing and getting really distorted only in my build version. I've tested a bunch of different build settings and the only build where it DOESNT distort the sprites is in 1280 by 720 resolution, full screen, pc build. Every other version I've tested (web player, etc.) all come out with distortion. Here is a video of what's going on: https://www.youtube.com/watch?v=t2cCnv7o0n4&feature=youtu.be
I'm really unsure what the cause is. Any help would be appreciated!
It's worth noting that there are no glitches whatsoever in the unity engine. This only occurs in build.
It's worth noting that there are no glitches whatsoever in the unity engine. This only occurs in build.
I assume you meant Unity Editor ins$$anonymous$$d of Unity Engine. Both the editor and your built executables use the Unity Engine to drive behaviour. Not trying to be a smart ass, but it could be helpful to know the distinction.
Answer by Statement · Oct 10, 2015 at 11:42 AM
This is not a solid answer to what is causing this but here are some steps on how to tackle unexpected behaviour like this.
Try to reduce the scene into the smallest possible but still reproducible representation. For example, make a copy of the scene and start removing objects until you have only the glitchy behaviour. This is to reduce the scope of possible interactions and if you need to later file a bug report, you have a good reproducible. This all is to make the problem easier to understand. During this process you may notice that the flicker disappears. Then it could be related to an object you recently removed. Step back and include that object again, and keep on pruning other objects.
When you have your basic repro, try and tweak whatever parameters you still have. I'm thinking of things like texture importer settings, having the sprite in or out of an atlas, changing material/shaders, any scripts that still may be running, even having no image for your sprite or a solid white etc... Once you have solidly narrowed down what caused the behaviour, you'll be better armed to fix it yourself or identify if it possibly could be the seed for a bug report to Unity.
Lastly, I'd also like to point out that it may be wise to first try and run the built version on a different computer to see if it reproduces there too. Just saying I've had computers with glitchy graphics cards causing all kinds of strange behaviour. Not saying that's what you got there, but it's a quick test and shows its not just that one machine.
Answer by phygitalmadhouse · Nov 11, 2019 at 10:34 PM
Hi , maibe late but i have been struggle with a "SPRITE ANIMATION GLITCH ON BUILD" , and thats my workaround following the statement answer:
-No matter what kind of graphics changes make any effect.(camera rendering path , texture properties , or graphic options).
STEPS -Delete any files from resource folder -make a new scene based on your damaged "only in build" scene. -Disable all image sprite sheets or change by blan texture and build.(works but with no texture as expected) -Enable one SpriteSheet and build.(finally just one sprite sheet in build with no glitch but others blank). -Enable one by one and build at every stage of enabling high size sprites prefabs/objects/containers.
And finally all scene look fine .
figure out reading lot of forums and documentation an believe is due some texture size exceeded , and my project match this.(use heavy ui animated , masked , tiled , sprite sheets for a marketing app due owners mandatory resources).