Files
VR-WuKong/Assets/ThirdParty/BruteForce/Scripts/BF_LightSwitch.cs
2025-11-14 18:44:06 +08:00

31 lines
551 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BF_LightSwitch : MonoBehaviour
{
public GameObject lightScene;
public Material skyboxScene;
void OnEnable()
{
if(lightScene != null)
{
lightScene.SetActive(true);
}
if(skyboxScene != null)
{
RenderSettings.skybox = skyboxScene;
}
}
void OnDisable()
{
if (lightScene != null)
{
lightScene.SetActive(false);
}
}
}