Files
ichni_Official/Assets/Scripts/Manager/BackgroundController.cs
SoulliesOfficial d4e860fa16 initial
2025-06-03 02:42:28 -04:00

30 lines
721 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Ichni
{
public class BackgroundController : MonoBehaviour
{
public Canvas backgroundCanvas;
public Image backgroundImage;
public Material skyboxMaterial;
public void EnableBackground(bool enable)
{
backgroundCanvas.gameObject.SetActive(enable);
}
public void SetBackground(Sprite sprite)
{
backgroundImage.sprite = sprite;
}
public void SetSkybox(Material material)
{
skyboxMaterial = material;
RenderSettings.skybox = material;
}
}
}