Firstborn/Assets/SpaceSkies Free/Demo/Scripts/SkyboxChanger.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

20 lines
455 B
C#

using UnityEngine;
using UnityEngine.UI;
public class SkyboxChanger : MonoBehaviour
{
public Material[] Skyboxes;
private Dropdown _dropdown;
public void Awake()
{
_dropdown = GetComponent<Dropdown>();
//var options = Skyboxes.Select(skybox => skybox.name).ToList();
//_dropdown.AddOptions(options);
}
public void ChangeSkybox()
{
RenderSettings.skybox = Skyboxes[_dropdown.value];
}
}