Технологии

Вот код как загрузить LoadScene через 2 секунды - вопрос №4183782

Вот код как загрузить LoadScene через 2 секунды

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine; using
  4. UnityEngine.SceneManagement;
  5. public class True: MonoBehaviour
  6. {
  7. public void LoadScene(int level)
  8. {
  9. StartCoroutine(instObj())
  10. SceneManager.LoadScene(level);
  11. } public void Exit()
  12. {
  13. Application.Quit();
  14. }
  15. IEnumerator instObj()
  16. {
  17. yield return new WaitForSeconds (2.5f);
  18. }
  19. }

январь 30, 2021 г.

  • Всего ответов: 0

Похожие вопросы