Answer the question
In order to leave comments, you need to log in
I'm trying to make a loading scene and it gives me an error, what should I do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class loading : MonoBehaviour
{
public int SceneID;
// Start is called before the first frame update
void Start()
{
StartCoroutine(AsyncLoad());
}
IEnumerator AsyncLoad()
{
AsyncOperation operation = SceneManager.LoadSceneAsync(SceneID);
}
}
Answer the question
In order to leave comments, you need to log in
I have been working in C# for a long time, but as far as I can see, IEnumerator AsyncLoad() has a specific type, which means that a value should be returned, or try to make it void.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question