using System.Collections; using System.Collections.Generic; using UnityEngine; public class DelYShow : MonoBehaviour { public GameObject obj1; public GameObject obj2; // Start is called before the first frame update void Start() { StartCoroutine(DlyShow()); } IEnumerator DlyShow() { yield return new WaitForSeconds(125);//2`05秒 print("开始UI"); obj1.SetActive(true); yield return new WaitForSeconds(15);//2`20秒 print("结束"); obj1.SetActive(false); obj2.SetActive(true); } }