netpyoung / unity.webp

:art: WebP made easy for Unity3d
https://netpyoung.github.io/unity.webp/
MIT License
237 stars 28 forks source link

Error when importing file with default settings when generating mip maps #37

Closed hybridherbst closed 2 years ago

hybridherbst commented 2 years ago

The attached file throws errors when importing in Unity 2020.3 with the latest 0.3.2 package with the default settings. fire.webp.zip

UnityException: LoadRawTextureData: not enough data provided (will result in overread).

When toggling "Mip Maps" off, the file imports correctly, so there might be an issue with adding/generating mipmaps to the file on import?

netpyoung commented 2 years ago

HI, greeting

I also reproduce that bug on my local machine. and fixed one problem asscitate with mipmap count - e111419e5729e09a07a0ddda41c499d5eb49b8ba

Then, another problem is still alive when apply mipmapped texture(RGBA32) to target texture.

netpyoung commented 2 years ago

I also reproduce that bug on my local machine. and fixed one problem asscitate with mipmap count - e111419

It was not a problem mipmap count. I didn't deeply thinking about WebPImporter at that time. and main point is how to convert texture in unity. so I modified some code on caa548a

feel free to give feedback