using System; using UnityEngine; using UnityEngine.UI; public class Goal : MonoBehaviour { public GameObject WinUI; public AudioClip Win; private void OnTriggerEnter(Collider other) { if (other.tag == "IceBlock") { Debug.Log("Win"); WinUI.SetActive(true); } if (WinUI.activeSelf) { BackgroundManager.StopBG(); BackgroundManager.PlayBG(false,Win); } } }