I wont bore you with the scenario but I am trying to dynamically create a skybox based upon the scene.

So I put a camera in the center render it out to a cubemap using RenderCubeMap then create a new Material using the skybox/cubemap shader. This all seems to work but I cannot figure out how to set the actual cubemap texture, I have tried using materialSetTexture("_Cube", myCubemap) tried changing the name to "Cubemap" tried setting the mainTexture even tried to use the index based method passing in 0, just nothing ever seems to show up in the texture for the material thats been created.

I cannot find any documentation on what the shaders vars are, other than the unity default _Cube name, so am I doing anything obvious which is wrong? if not can anyone confirm if the texture name in the shader.

Hi @Macro,
try with _Tex