How to create a transparent texture at runtime?

Hi, I’m finding it near impossible to work with Unity’s Terrain API. I’m trying to get a partially transparent image painted on my terrain at runtime. However, the image ends up not being transparent. I saved the image as psd and set up the alpha channel. I even confirmed that it shows up transparent on a Plane object with the Unlit Shader selected. However, I cannot change the shader attached to the Terrain object because it is greyed out as "Default-Terrain-Standard (Material), which I suspect is the problem. I have read in posts about editing Shader scripts, but it seems way more complicated than need be, especially since I haven’t used Unity in a while. Another thing I considered was changing the brush at runtime to a mask of the selected texture (removing the transparent parts), but Unity unhelpfully doesn’t include this in the Terrain API, or at least I couldn’t find it. Could anyone help me out?



6360615--707727--Screen Shot 2020-09-28 at 10.04.41 PM.png

Hm, this seems to work, testing in Unity2020.1.5. I put two terrains in, made one of them use a Transparent shader, gave it a transparent texture, but of course it does not respect the splatmap, but you can just find a splat-aware transparent shader and use it. Pic below. Lower terrain is tan (sand), upper terrain is the transparent one.

Thanks, but I am not sure how to change the shader from the default. It is greyed out so I can’t simply select a transparent shader. Btw I am using 2020.1.6