- Home /
Question by
ThePhantomGoat · Aug 01, 2018 at 02:02 AM ·
button trigger events
On button Load script not working (Tell me if you need more information)
using System.Collections; using UnityEngine.SceneManagement; using UnityEngine;
public class Load : MonoBehaviour {
public void LoadLevel (int sceneIndex)
{
StartCoroutine(LoadAsynchronuosly(sceneIndex));
}
IEnumerator LoadAsynchronuosly (int sceneIndex)
{
AsyncOperation operation = SceneManager.LoadSceneAsync(sceneIndex);
{
while (!operation.isDone)
{
Debug.Log(operation.progress);
yield return null;
}
}
}
(Here is a screenshot of the button)
help.png
(25.8 kB)
Comment
Answer by ThePhantomGoat · Aug 01, 2018 at 02:12 AM
THANk UUUUUUUUUUUUUUUUUUUUUUUUUUUU
Wait, It slipped my $$anonymous$$d how to do that, can U help? (sry im new to this)