Modifing Material Tiling by script

I tried to handle the streching of a texture by modifing the tile - parameter in the Material via editor (see pic) .

This works for me but now I tried to modify this by a script. But I cant find a Member like Tiling in the Material class…


Maybe I am on the Wrong way :slight_smile: can some one give me a hint, please?
The main problem I try to solve is to keep the texture in the correct scale depending on the size of the body. The Body is alway a multiple from the textures size. Perhaps there is an other way to solve this.

Have you tried the following variable or function?

No, I find it, but I had no idea for the first parameter “propertyName”. Is “_MainTex” the name of the texture? I will test this now.

Thanks for your help.