using System; using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; public class Ground : MonoBehaviour { private MeshRenderer meshRenderer; private void Awake() { meshRenderer = GetComponent(); } private void Update() { float speed = GameManager.Instance.gameSpeed / transform.localScale.x; meshRenderer.material.mainTextureOffset += Vector2.right * speed * Time.deltaTime; } }