Created
April 22, 2013 18:34
-
-
Save LoganBarnett/5437366 to your computer and use it in GitHub Desktop.
Animate a series of images like a gif.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IEnumerator Start() { | |
| var i = 0; | |
| while (true) { | |
| renderer.material.mainTexture = textures[i]; | |
| yield return new WaitForSeconds(delays[i]); | |
| ++i; | |
| if(i >= maxFrames) i = 0; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment