using UnityEngine; 

[ExecuteInEditMode] 
public class SpriteTiling : MonoBehaviour
{
    public Vector2 Tiling;
    public Vector2 AnimationDirection;

    public void Update()
    {
        this.GetComponent<Renderer>().sharedMaterial.mainTextureScale = Tiling;
        this.GetComponent<Renderer>().sharedMaterial.mainTextureOffset += AnimationDirection * Time.deltaTime;
    }


}

