Как увеличить время действия экрана загрузки уровня?

Есть скрипт и он работает когда грузится уровень, но грузится так быстро, что проигрывается всего 1 кадр. Как сделать так чтобы грузился уровень хотя бы секунд 5??? вот мой код

public void NextLvl()
    {
        Time.timeScale = 1f;
        player.enabled = true;
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
        StartCoroutine(LoadingScreen());
    }

    IEnumerator LoadingScreen()
    {
        AsyncOperation operation = SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().buildIndex + 1);
        loadingScreen.SetActive(true);
        while (!operation.isDone)
        {
            float progress = Mathf.Clamp01(operation.progress / .9f);
            yield return null;
        }
    }

Ответы (0 шт):