Skip to content

Instantly share code, notes, and snippets.

@almirage
almirage / ImageAnimation.cs
Last active October 6, 2025 05:12
Sprite animation for UI.Image on Unity
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ImageAnimation : MonoBehaviour {
public Sprite[] sprites;
public int spritePerFrame = 6;
public bool loop = true;
public bool destroyOnEnd = false;