how to do offset unity code example
Example: how to change the offset unity
using UnityEngine;public class Example : MonoBehaviour
{
// Scroll the main texture based on time float scrollSpeed = 0.5f;
Renderer rend; void Start()
{
rend = GetComponent<Renderer> ();
} void Update()
{
float offset = Time.time * scrollSpeed;
rend.material.mainTextureOffset = new Vector2(offset, 0);
}
}