Parses a GIF file and extracts the images
There is only one file, copy Assets\mgGif\mgGif.cs
to your project.
Alternatively, the upm branch can be pulled directly into the Packages
directory, e.g.
git clone -b upm [email protected]:gwaredd/mgGif.git
Or added to your Packages/manifest.json
file
{
"dependencies": {
"com.gwaredd.mggif": "https://github.com/gwaredd/mgGif.git#upm",
...
}
}
byte[] bytes = File.ReadAllBytes( filename );
var gif = MG.GIF.Decoder.Parse( bytes );
vr tex = gif.GetFrame( 0 ).CreateTexture();
See Assets\Scenes\AnimatedTextures.cs
for an example