using UnityEngine; using UnityEngine.UI; namespace Main { public class ProgressBarPanel : MonoBehaviour { private Image _fill; private Text _fillText; private Text _fillMessage; private void Awake() { _fill = this.transform.Find("Fill").GetComponent(); _fillText = _fill.transform.Find("FillText").GetComponent(); _fillMessage = _fill.transform.Find("FillMessage").GetComponent(); _fill.fillAmount = 0; _fillText.text = "0%"; } public async void SetProgressBarValue(string message, float value) { this.gameObject.SetActive(true); _fill.fillAmount = value; _fillMessage.text = message; _fillText.text = $"{value:P0}"; if (value >= 1) { this.gameObject.SetActive(false); } } } }