I have a script where it will change the skybox material according to a int and it works besides the fact that it doesn’t seem to change the ambient lighting in the scene. The skybox’s I’m using have each have different settings for exposure and tint colour. How can i also update the lighting when i change the sky material? thanks
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class skyboxUpdater : MonoBehaviour {
public int skyInt;
public Material sky1;
public Material sky2;
// Use this for initialization
void Start () {
if (skyInt == 0) {
RenderSettings.skybox = sky1;
}else if (skyInt == 1) {
RenderSettings.skybox = sky2;
}
}
// Update is called once per frame
void Update () {
}
}