using UnityEngine;
public class UITextureOffset : MonoBehaviour
{
float offset;
UITexture tex;
void Start()
{
tex = GetComponent<UITexture>();
}
void Update()
{
offset += Time.deltaTime;
if (offset > 1)
offset = 0;
tex
.material.mainTextureOffset = new Vector2
(offset,
0); }
}