using System.Collections; using System.Collections.Generic; //using Microsoft.Unity.VisualStudio.Editor; using UnityEngine; public class UILoadingBar : MonoBehaviour { public TMPro.TMP_Text TxtPercent; public TMPro.TMP_Text TxtLoading; public UnityEngine.UI.Image ProgresBar; public GameObject LoadingPanel; void Start() { } public void Show() { SetValue(0f); LoadingPanel.SetActive(true); } public void Hide() { LoadingPanel.SetActive(false); } /// /// 퍼센트 설정하기 /// /// 0~1 사이의 값 public void SetValue(float value) { TxtPercent.text = string.Format("{0:P0}", value); ProgresBar.fillAmount = value; } }