unity异步执行定时器(延迟执行)

    技术2022-07-17  108

    3秒后跳转至登录场景

    using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class load : MonoBehaviour { // Use this for initialization void Start() { StartCoroutine(PlayerAttack()); } // Update is called once per frame void Update() { } IEnumerator PlayerAttack() { yield return new WaitForSeconds(3.0f); SceneManager.LoadScene("login"); } }
    Processed: 0.009, SQL: 9