Main Menu Button help
Im just getting an error message saying that LoadScene is an unknown identify. Any idea what i can change it too???
var quit=false;
function OnMouseEnter() {
GetComponent.<Renderer>().material.color = Color.white; //Change Color to white!
}
function OnMouseExit() {
GetComponent.<Renderer>().material.color = Color.red; //Change Color to red!
}
function OnMouseUp() {
if (quit == true)
{
Application.Quit(); //If you click on quit aplication quits.
}
else
{
LoadScene(1); //If you click on other button it loads game!
}
}
function Update() { if (Input.GetKey(KeyCode.Escape)) //If you press (escape) game force closes! { Application.Quit(); }
}
Answer by marfa4321 · Jan 01, 2016 at 08:10 AM
Write Application.LoadLevel in unity 5.2 or SceneManager.LoadScene in Unity 5.3
Hi thanks for the help however im still co$$anonymous$$g across an issue. I tried Application.LoadLevel and it is co$$anonymous$$g up with a yellow message saying it is obsolete and when i tried Scene$$anonymous$$anager.LoadScence it was saying it is an unknown identify????? Any ideas
Oh sorry.
In first line of your code, write : using UnityEngine.Scene$$anonymous$$anagement;
if you use C# or import UnityEngine.Scene$$anonymous$$anagement;
if you use JS
And change LoadScene(1) to Scene$$anonymous$$anager.LoadScene(1);
I hope this work @JasperGlobal :)
Your answer
Follow this Question
Related Questions
Singleton GameManager with DontDestroyOnLoad acting weird 0 Answers
Premature level loading. String loads level, instead of Return key. 2 Answers
SteamVR_LoadLevel() freezes when done loading in builds only 1 Answer
How to get the Cursor to be visible after returning to main menu. 1 Answer
I'm having trouble getting my "Restart" button to work 2 Answers