I am trying to download images from a storage and put them in planes.
Eventhough the images ending are .png, their bytes actually point to them being Webp.
I do not have control over the image webp type.
When I try to download and load a .png image with my code in unity, it works great.
When I tru to download and load a webp image with the same code, it gives me a Download Handler error:
Fallback request failed: Data Processing Error, see Download Handler error
UnityEngine.Debug:LogError (object)
ShelfPopulator/<LoadImageAndPopulateRobust>d__10:MoveNext () (at Assets/Scripts/ShelfPopulator.cs:157)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/Coroutines.cs:17)
However, when I take the same webp image and drag into unity (with .png ending on the name), it works as a Texture 2D for the exact same plane (I checked and the file does not become .png, it keeps being webp type).
I would rather not using an outside library to do this, and I am guessing there is some workaround this, as by dragging it unity does recognize webp.
Any ideas on how this could be done?
Thank you in advance.