skybox transition
I am trying to transition from one skybox to another. As of now i have a skybox array with the different skybox materials stored in it. The first sky box is black(intentionally) and I am trying to transition from the first sky box to the next but when I do the skybox appears to not change. Looking at the material the skybox is made out of, when the game starts the tint of it is set to black (0,0,0,0) in the inspector, if I change it to white (255,255,255,255) the skybox is there. I've tried programming the skybox array to set the skybox color and tint to white but neither seems to do the trick. Any idea what may be causing it? or a better way to do it would be fine too.
void Start () {
RenderSettings.skybox = skyBox[1];
skyBox[1].SetColor("_TintColor",Color.white);
RenderSettings.skybox.SetColor ("_TintColor", Color.white);
}
void Update () {
skyBox[1].SetColor("_TintColor",Color.white);
RenderSettings.skybox.SetColor ("_TintColor", Color.white);
RenderSettings.skybox.Lerp (skyBox [0], skyBox [1], 0.2f);
}
Your answer
Follow this Question
Related Questions
Best way to transition between two skybox textures 0 Answers
How do you reflect a directional light Sun in Unity5 water? 2 Answers
Pink scene view, skybox and materials (Unity 5.4.1f1) 2 Answers
Prefab Undefined Behavior? 0 Answers
How can I use the Skybox/Panoramic shader so that it displays inside a sphere? 0 Answers