SliderValuePass.cs 364 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class SliderValuePass : MonoBehaviour {
  6. Text progress;
  7. // Use this for initialization
  8. void Start () {
  9. progress = GetComponent<Text>();
  10. }
  11. public void UpdateProgress (float content) {
  12. progress.text = Mathf.Round( content*100) +"%";
  13. }
  14. }