Files
ScienceLab.Density/Assets/Scripts/Lesson_1/Lesson1Controller.cs
2026-06-04 00:55:54 +03:00

42 lines
962 B
C#

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();
}
}