using System.Collections; using System.Collections.Generic; using UnityEngine; public class skewing : MonoBehaviour { MeshRenderer mr; public Material material; public Material material1; float offset; public float scrollSpeed = 0.5F; private void Start() { //mr = GetComponent(); } void Update() { offset = -Time.time * scrollSpeed; //mr.materials[0].mainTextureOffset = new Vector2(-offset, 0); material.mainTextureOffset = new Vector2(-offset, 0); material1.mainTextureOffset = new Vector2(-offset, 0); } }