C# Unity场景-重新启动按钮导致进程停止
我需要有关重新启动按钮的帮助..当我重新加载场景时,所有进程都将停止。 //开始C# Unity场景-重新启动按钮导致进程停止,c#,unity3d,C#,Unity3d,我需要有关重新启动按钮的帮助..当我重新加载场景时,所有进程都将停止。 //开始 void Start() { if (NoAnsweredQuestion == null || NoAnsweredQuestion.Count == 0) { NoAnsweredQuestion = question.ToList<Question>(); } SetcurrentQuestion(); StartCoroutine("Co
void Start()
{
if (NoAnsweredQuestion == null || NoAnsweredQuestion.Count == 0)
{
NoAnsweredQuestion = question.ToList<Question>();
}
SetcurrentQuestion();
StartCoroutine("CountDownTimer");
}
//转换
void SetcurrentQuestion()
{
int randomQuestionIndex = Random.Range(0, NoAnsweredQuestion.Count);
currentQuestion = NoAnsweredQuestion[randomQuestionIndex];
factText.text = currentQuestion.fact;
correctAnswerText.text = currentQuestion.answered;
}
IEnumerator TransitiontoNextQuestion()
{
NoAnsweredQuestion.Remove(currentQuestion);
yield return new WaitForSeconds(delaybetweenquestion);
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
这是我游戏的重新启动按钮
public void restart()
{
WWWForm form = new WWWForm();
WWW www = new WWW(restartBegGrammarIAQ, form);
Application.LoadLevel(Application.loadedLevel);
}
你重启按钮的信息在哪里?有什么错误?我没有错误,先生。那么你想要什么?你想感谢你创造了这个未知的游戏吗?或者你想发布你的游戏?没有,先生…但我的问题是当我点击按钮重新启动时,重新加载场景将冻结或停止处理整个场景这不是答案。把它编辑成你的问题