Here’s the JS script to load a level but how do I set it up for a quit button?
2158128–142581–clickstartscript.js (84 Bytes)
Here’s the JS script to load a level but how do I set it up for a quit button?
2158128–142581–clickstartscript.js (84 Bytes)
Could you just paste the code using script tags.
function Quit()
{
Application.Quit();
}
For Button detection:
function Update()
{
if (Input.GetKeyDown(KeyCode.Escape)
{
Quit();
}
}