using UnityEngine;
using System.Collections;

public class AutoTiler : MonoBehaviour
{

	Renderer rend;
    public bool flipY = false;
	void Start ()
	{
		rend = GetComponent<Renderer> ();
		Material mat = rend.material;
        if (flipY)
        {
            mat.mainTextureScale = new Vector2(transform.localScale.x, - transform.localScale.y);
        }
        else
        {
            mat.mainTextureScale = new Vector2(transform.localScale.x, transform.localScale.y);
        }
		//rend.material.mainTextureScale
	}
}
