Question by
SunnyStarlight · Apr 19 at 09:47 PM ·
c#load scene
"Method arguments are incompatible" when loading a scene
Hi. I'm new to Unity and C#
I'm trying to implement a feature to go back to the first scene using it's buildIndex
when you press a button. I have the following script linked to the button, with the function in its onClick()
. When I press the button, however, it gives me the error: method arguments are incompatible
and does not load the scene.
Anyone know what could have caused this?
I'm currently using unity 2020.3 if that's important.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class ResetGame : MonoBehaviour
{
void ResetTheGame() {
SceneManager.LoadScene(0);
}
}
Thanks in advance!
Comment
Your answer
Follow this Question
Related Questions
Materials do not load when a new scene is loaded realtime? 1 Answer
How to fix Loading Screen? 0 Answers
click idle and i use PlayerPrefs 2 Answers