I have a material with its shader set to Skybox/Cubemap and I have cubemap1 assigned to the slot. Now I want to replace cubemap1 with cubemap2 and I found a script for this, but i can't seem to get it working.
any thoughts?
#pragma strict
var cubemap2 : Cubemap; //Change texture for cubemap
var shaderCubemap : Material; //Shader with cubemapslot
function Start () {
shaderCubemap.SetTexture("_Cube",cubemap2);
}