using UnityEngine; public class Lesson1Controller : MonoBehaviour { public static Lesson1Controller Instance { get; private set; } public float activeExperiment = 0; public Material forestSkybox; public Material lunarSkybox; public GameObject forestEnvironment; public GameObject lunarEnvironment; void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } } public void SetForestSkybox() { RenderSettings.skybox = forestSkybox; forestEnvironment.SetActive(true); lunarEnvironment.SetActive(false); //DynamicGI.UpdateEnvironment(); } public void SetLunarSkybox() { RenderSettings.skybox = lunarSkybox; forestEnvironment.SetActive(false); lunarEnvironment.SetActive(true); //DynamicGI.UpdateEnvironment(); } }