Animating a Texture2D using cells

Hi,

Im trying to use the <a href=unifycommunity.com>animating tile texture code from the Unify Community. I really like the idea, but im trying to figure out how to use this same principal on a texture2D copy instead of an objects material.

Is this possible? Or maybe too much work for the end result? If you know of a better way to do a tile animation on a texture, im all ears!

Thanks in advance!

You can use the same method for GUI in a much simpler way using Graphics.DrawTexture()

You can use the same method from that unify link for calculating uvs and jus pass the UV values to the above function.

Having an array of textures would be heavy never ever prefer it. Even if you want to do it with multiple textures, you gotta use Resources.Load(), with an array of string for the path of the textures. Any way you gotta call this function often to keep the memory in check.

Hope it helps :slight_smile: