Forum rules - please read before posting.

WebGL and Sprites in Animated Portraits/UI

While testing out the 2D side of things I encountered something I can't make heads or tails.

I have an animated portrait for my main character, which takes up around quarter of a screen. It is only a 2 frame animation.
While it looks fine in Unity and in a windows testbuilt, it completely breaks in webGL.

In Unity:
image

In windows export:
image

In webgl:

image

I can tell from the places where the image is cut, that the UI-Frame is still the size it should be. Hoewever the sprites (for the portrait and the text BG seem to be scaled somehow.
Everything not relying on sprites (texts and black background) stay in place and still look good.

I tested around for a couple of hours, but I'm at a dead end on my side.
Has someone replicated or experienced this at one point?

Comments

  • edited September 2016
    I think this is more of a Unity issue. It may have to do with texture compression, or filter mode (Trillinear).So try changing the sprites filter mode or compression and see if that fixes it. I've also heard it may be an issue while building. So you could always try to redo the build again and see if it works then.
  • While I use "point" to keep all the jaggies in tact, I tried around with other things.

    And lo and behold, turning off "Generate Midmaps" totally did the trick.
    Now, I don't get why this doesn't matter for other graphics (the character or the background) but only for the UI elements, but I also heard that Unitys WEBGL is still a tiny bit on the experimental side.

    Thank you for hinting towards sprite/texture compression though! This solved my problem!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.