void Update() { if (EyeIndex!=PreviousEyeIndex) { this.GetComponent<RawImage>().texture = eyes[EyeIndex]; //this.GetComponent<UITexture>().mainTexture=Resources.Load <Texture2D> ("HUD/Eyes/Eyes_"+ EyeIndex.ToString("0000")); } }