- Home /
2D animation
I had a question: is there a way to import (or create) flat GUI or 2D animations? I know how to make 3D animations using autodesk Maya, but I don't know how to make 2D shapes specifically animate... like a GIF sequence. Is there a way?
Answer by robertbu · Jul 05, 2013 at 12:11 AM
There are three approaches I know of. The first is to cycle through a set of textures. You will find some example code in this answer:
http://answers.unity3d.com/questions/19848/making-textures-scroll-animate-textures.html
The second way (also mentioned in the answer link) is to use a texture sheet and animate the texture offset of the material. You will find examples in the Unity Wiki including here:
http://wiki.unity3d.com/index.php?title=Animating_Tiled_texture
The third way (and I don't have any example code to point you at), involves using a texture sheet and changing the UVs of the plane. This is the best way and used by third-party interface tools like NGUI and EZGUI. It is best because multiple animations (sprites), get batched together reducing drawcalls.
Your answer
Follow this Question
Related Questions
Creating HUD animation for VR using built in tools. 0 Answers
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers
CoolDown Animation on the GUI 1 Answer
HUD animation with game in background 0 Answers