sprite animation change position webgl issue
hi all, I'm pretty new to the unity 5 and specially to the webGL.
I'm developing an arcade game in unity5.1.1f1.
i have different animation for every move of the player (press down - player ducks. press up - player jumps).
i use the animator for this and i have animation controller with some booleans to state the player moves from animation to animation.
all of the changes are made by a C# scripts of the player by the Animator Class and Set.Bool function.
in the development stage (when I'm running the game in unity - no build) it all runs smooth with no bugs, but when i move the game to a server or playing in build & run mode i run into animation problems.
instead of showing the animations it shows purple figure.
does anyone have an idea for the solution of this annoying problem?
thanks in advance.
Answer by MakakWasTaken · Nov 02, 2015 at 08:51 AM
I don't Think that problem has anything to do with animating, it is more likely that you are using a shader which isn't included when building. Go to Edit/Project/Graphics and add the custom shader to the list.
a. i think it's somewhere between the animator and the scripts. because when i set the default of the player to each animation separately without using the script (without letting the key to change the player animation) and playing it through localhost (build & run) the animation works.
moving from 1 animation to another is the problem.
b. i use the sprites-Default. i don't know otherwise. ;(
i attached photos. before and when i press the down key
[1]: /storage/temp/57410-2015-11-02-11-15-47-unity-webgl-player-cicles.png
Have you checked that the sprites-default is in the list of included shaders?
Answer by benamika · Nov 02, 2015 at 11:37 AM
FIXED!!
so I've been playing around with my project and found that my sprite's properties were not the same.
in some sprites the format was Truecolor, and the other was on compressed.
i don't relay understand the fix but when i changed the sprites to the compressed format it fix the problem.
Your answer
Follow this Question
Related Questions
Unity WebGL Disable mobile warning 12 Answers
Unity WebGl escape button 0 Answers
Unity 5 Web GL failed 1 Answer