ChangeButtonText.cs 360 B

123456789101112131415161718
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class ChangeButtonText : MonoBehaviour
  6. {
  7. public Text text;
  8. private int day = 2;
  9. public void ChangeText()
  10. {
  11. text.text = "Submit Day " + day;
  12. day++;
  13. if (day > 3)
  14. day = 1;
  15. }
  16. }