Sanket Prabhu
Sanket Prabhu

Reputation: 2232

How to add .gif Animation in unity Scene ? Does Unity support Animated GIFS?

I am working on Unity + Augmented reality. I want to show some "animated .gif" file on specific location on Marker detection event. I manage all but, I wanna display .gif animation at specific location on Android screen. But I think

Unity does not support .gif

and

Android does not support VideoTexture.

Upvotes: 7

Views: 71457

Answers (1)

joreldraw
joreldraw

Reputation: 1736

Unity not support Gif.

You have 2 options:

  1. Split animation and use Animator: there you have a nice howto
  2. Save individual frames and make an array of textures.

    var frames : Texture[]; var framesPerSecond = 10;

    function Update() { var index : int = (Time.time * framesPerSecond) % frames.Length; renderer.material.mainTexture = frames[index]; }

Upvotes: 11

Related Questions