LoadingMgr.cs 710 B

12345678910111213141516171819202122232425262728
  1. using SC.XR.Unity.Module_InputSystem;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using XRTool.Util;
  6. public class LoadingMgr : UnitySingleton<LoadingMgr>
  7. {
  8. public GameObject loading;
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. loading = transform.Find("loading").gameObject;
  13. loading.SetActive(false);
  14. }
  15. public void ShowLoading(float time)
  16. {
  17. loading.SetActive(true);
  18. SCInputModule.Instance.CanProcessEvent = false;
  19. Invoke("HeidLoading", time);
  20. }
  21. public void HeidLoading()
  22. {
  23. loading.SetActive(false);
  24. SCInputModule.Instance.CanProcessEvent = true;
  25. }
  26. }