- Home /
www returns gif . How to convert it to texture2d in Unity3d for Android?
I have been trying to get a gif image from the network in Unity. But using www.texture returns a big red question mark on the plane. .gif rendering is not supported in Unity.
What is the correct way to do it? How to use the parser for this? I don't know what my server will return. It may return a png or a gif file.
@gjf Yes I did. $$anonymous$$ost of them recommended me to use plugins. I guess its possible to make a parser myself. I would prefer looking into Texture2D class.
Answer by Graham-Dunnett · Jul 31, 2014 at 10:55 AM
If your server can return gif files, then you will need to implement your own GIF reading code, and use the pixel processing members of the Texture2D
class. (It'll be easier to just set up your server to only return pngs.)
I guess it is not possible from server end so can you explain "pixel processing members of Texture2D class".
However I came across this code wiki.unity3d.com/index.php/AnimatedGifDrawer but problem with this is System.Drawing.dll does not compile for android platforms as it throws exception.
Your answer
![](https://koobas.hobune.stream/wayback/20220613155450im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Run Function when user shakes mobile andriod unity c# 0 Answers
How to save current level? 1 Answer
How to know which code depends on System.dll in mono C#? 1 Answer
Android Downloading Packages Online 2 Answers
null texture passed to GUI.DrawTexture 0 Answers