What have I done wrong on the OnClick script from Creating a Main Menu tutorial?
Hi, Trying to learn the UI of Unity 5.6. First time trying, so going through the tutorials and live videos. Stuck at the LoadSceneOnClick about 37 minutes into the video of 'Creating a Main Menu'. I get compilation errors from the script that reads:
using System.Collections; using UnityEngine; using UnityEngine.SceneManagement;
public class LoadSceneOnClick : MonoBehaviour {
public void LoadByIndex (int sceneIndex)
(
SceneManager.LoadScene sceneIndex);
)
}
Maybe someone can tell me what I'm doing wrong. Thanks for any help.
Your answer
Follow this Question
Related Questions
AddListener fuction throwing a NullReferenceException error 1 Answer
UI Buttons Trigger displaced after build. Help Please 0 Answers
UI in World Space doesn't respond 1 Answer
UI in the end of the scene 0 Answers
why does game work in unity when I play it, but no UI buttons work in Unity remote? 0 Answers