UpdateFont.cs 497 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class UpdateFont : MonoBehaviour
  6. {
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. StartCoroutine(UpdateFontAsset());
  11. }
  12. IEnumerator UpdateFontAsset()
  13. {
  14. while(!SetWebGLText.webglfont)
  15. {
  16. yield return null;
  17. }
  18. this.GetComponent<Text>().font = SetWebGLText.webglfont;
  19. }
  20. }