using System.Collections; using System.Collections.Generic; using UnityEngine; public class PortalEffect : MonoBehaviour { Material mat; // // Start is called before the first frame update void Start() { //get the texture applied to the model mat = GetComponent().material; } // Update is called once per frame void Update() { //increment the y offset of the material //mat.mainTextureOffset += new Vector2(0, 0.5f * Time.deltaTime); //make the maintexture sine wave mat.mainTextureOffset = new Vector2(0, Mathf.Sin(Time.time * 2.0f) / 10.0f); } }