Scripting Shader: How to control Alpha with slider?

I’m creating a skybox with physical spheres. And I duplicated the Unlit>Transparent shader to create a skybox shader.
I have a color for brightness and a slider to control the alpha (from 0 to 1). The idea is manipulate the slider in other scripts to create the blend effect and see the other skybox through the first one.

But I have no idea how to script shaders. I look around and learned a bit from the manual and other sites but still don’t really understand how the code must be written.

In properties I have the slider, brightness color(or tint) and the texture:

_MainTex (“Base (RGB) Trans (A)”, 2D) = “white” {}

_Brightness (“Brightness”, Color) = (.5, .5, .5, 0.5)

_Alpha (“Alpha”, Range(0.0,1.0)) = 1

But then I don’t know how to apply the value of the slider to the alpha of the texture.
The alpha should be the same on the whole image, there is no gradient or anything.

Thanks!

you can access a shader via renderer.material…

in this case, there are already several working examples out there if you look… This one works:

http://forum.unity3d.com/threads/115455-Unlit-with-adjustable-Alpha

then you can access the alpha as you normally would, by saying:

renderer.material.color.a = someValue; //from 0 to 1;

this would work with the transparent diffuse, but not the unlit/transparent, though I don’t actually know exactly why,just that the unlit/transparent doesn’t have a color property… If there is a way to script the unlit/transparent I don’t know it…