unity.webp
unity.webp copied to clipboard
Animated WebP image issue using LoadTexturesAsync
using unity.webp 0.3.11
Due to our application scenario, asynchronous loading is required. There is an issue of image output when you call the method below and use it.
WebP.Experiment.Animation.WebP.LoadTexturesAsync(byte[])
We tested 3 images.
- https://colinbendell.github.io/webperf/animated-gif-decode/2.webp
- https://colinbendell.github.io/webperf/animated-gif-decode/3.webp
- https://mathiasbynens.be/demo/animated-webp-supported.webp
There is a problem with the pixel looking broken as shown in the screenshot below.

And the error log below is also output.
[WebPDecoderWrapper] Bytes to texture error: LoadRawTextureData: not enough data provided (will result in overread).
I also have same problem of that. There is something what I can't understand when passing decoding option. So please avoid to use Experiment that function.
- check Samples/example2/animation.unity then moidfy WebpAnimation.cs logic to fit your game.
@netpyoung As I checked, the WebPDemuxGetFrame function returns the width and height values abnormally.
@dw8869
It seems so. WebP.Experiment.Animation.WebPDecoderWrapper.CreateDecoder couldn't create proper decoder. I also tried to modify to change decoder's behaviour via options but failed until now.