I was able to do smth like this to strech an material with standartShader in the standart render pipeline.
Renderer renderer = getComponent<Renderer>();
renderer.material.mainTextureScale = new Vector2(5,1);
but doing so with the lit shader in lwrp nothing happens.
tried it with the following, but i guess “Tiling” is not the Right Propety name. Inside the lit shader i couldnt find the Right Property by lookig at it.
MaterialPropertyBlock block = new MaterialPropertyBlock();
block.SetVector("Tiling",new Vector4(5,1,0,0));
This works, for anyone completely new this is the full code I used:
Material m = gridPlane.GetComponent<MeshRenderer>().material;
MaterialPropertyBlock mblock = new MaterialPropertyBlock();
mblock.SetVector("_BaseMap_ST", new Vector4(5.0f, 5.0f, 0, 0));
m.mainTexture.wrapMode = TextureWrapMode.Repeat; // it wasn't repeating for me so I added this
gridPlane.GetComponent<MeshRenderer>().material = m;
gridPlane.GetComponent<MeshRenderer>().SetPropertyBlock(mblock);