Hello, I am currently making a game where you collect items and it fills a progress bar. Unfortunately, I cannot seem to figure out a script that sets my Level Complete UI canvas to “Active” when the Progress bar is = to max value. Assistance would be greatly appreciated.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ProgressBar : MonoBehaviour
{
public Slider slider;
public GameObject LevelCompleteUI;
public void SetMaxProgress (int progress)
{
slider.maxValue = progress;
slider.value = progress;
}
public void SetProgress (int progress)
{
slider.value = progress;
}
}