When Compiling to WebGL, not all Sprites Render Properly. Why?
I've made some updates to a game I made for Ludum Dare 34. It was working perfectly fine in the first release, the graphics looked as intended. After making a few changes and recompiling for WebGL, the player sprite and power up sprites are all showing up as black blobs. You can see what I mean here: http://bazkur.itch.io/stickman-sam-in-the-high-fly-sky?secret=zMzoOTZzeccZC0uvl0wr9V1kMeY
I've not changed any compile settings from the last compile and the game runs perfectly fine as an executable. Any idea what would cause my sprites to look this way in WebGL especially considering it wasn't an issue before? Thanks!
This has been posted to Reddit as well: https://www.reddit.com/r/Unity3D/comments/40nhxb/webgl_sprite_rendering_issues_need_help/
Answer by CDMcGwire · Apr 20, 2016 at 05:28 AM
Hello!
I recently had the same problem and found that it was because my sprite file was set to the "Trilinear" setting in Filter Mode on the file's inspector panel.
Should help. Also, liked your game concept. :D
Wasn't this but I have it fixed. Actually don't think I did anything, just recompiled it in 5.3.4 and it worked.
Answer by Qhuhuit · Nov 11, 2016 at 03:40 PM
Hi ! Same problem here, and since I make a pixel-art game, all my sprites are set to "no filter". My desktop build works fine but my webGL randomly not render some sprites.
All my sprites are set in this way :
Texture mode "Sprite"
Pixel per unit : 1
Generate Mip Maps : check
no filter
Max Size 2048
Format Compressed
I try different settings, and still have bugs sometimes, don't understand where they come from...
Your answer
Follow this Question
Related Questions
C# to WebGL 2 Answers
il2cpp.exe did not run properly, a python compile error 1 Answer
I am having some Emscripten compiling errors, could somebody help me with this 1 Answer
Android button render issue 0 Answers
WebGL audio pitch weirdness 2 Answers