//gets the local scale of an object
vector3 local = transform.localScale;
//sets the local scale of an object
transform.localScale = new Vector3(scaleX,scaleY,scaleZ);
//gets the world scale of the object but is read only
vector3 world = transform.lossyScale;
public GameObject cube;
public Vector3 sizeChange; // This has to be set for (x,y,z) in the editor
//public float cubeSize = 0.2f;
void OnMouseDown()
{
cube.transform.localScale = cube.transform.localScale - sizeChange;
}