Unity3D – Materials – SetTextureScale – JavaScript

Create a Plane with
– Material with a _MainTex (if you use a diffuse material it is the main color texture)
– TextureScale.js


#pragma strict

function Start () {
        // setup Main Texture (scaleX,scaleY) 
	renderer.material.SetTextureScale ("_MainTex", Vector2(0.5,1));

}

function Update () {

}

Play to see the final result