hi everyone
find solution which work for me for loading scene with pause like this
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LoadingScene : MonoBehaviour {
//IEnumerator Generics
IEnumerator pauseLoadingScene()
{
yield return new WaitForSeconds(5f);
}
// Start is called before the first frame update
void Start()
{
StartCoroutine(pauseLoadingScene());
}
void Update() {
}
}
anybody know easy way, how loading scene forexample like this ?
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
public class finalWall5 : MonoBehaviour {
public GameObject finalWallLevel5;
//wall particle effect
public GameObject finalwall5pe;
private GameManagerLevels GMControl;
public string loadinglevel;
// Start is called before the first frame update
void Start()
{
finalwallpe.SetActive(false);
GMControl = FindObjectOfType<GameManagerLevels>();
}
public void checkscore500coll()
{
#if UNITY_ANDROID
if (GMControl.currentScore == 500)
{
//snd effect
//particle effect
Time.timeScale = 1f;
SceneManager.LoadScene(loadinglevel);
}
#endif
}
}
big problem for me what I cant use snd or particle effect rightly because that
s not work for me, and scene loading
thanks for advices