void Update() { if (mCurrent.sprite != sprite) { mCurrent = new UnityEngine.UI.Sprite(sprite); mImage.sprite = mCurrent; } }
void Awake() { mImage = GetComponent <Image>(); mCurrent = mImage.sprite; sprite = mCurrent.sprite; }