I need help with my code to pause the game this is my code function Update () { if (Input.GetKeyDown("escape")); { Application.LoadLevel : ("main_menu"); } } My error - Assets/Custom Scripts/Pause.js(4,59): BCE0044: expecting :, found ';'.
Code (csharp): function Update () { if (Input.GetKeyDown("escape") { Application.LoadLevel("main_menu"); } } But this will not pause your game. It will load level "main_menu". To pause you will want to you use Time.timeScale = 0;
umm you forgot the ) at line 2 to end it but thanks anyways (btw i wanted to use the application thing to get back to the main menu)
Warning: Using Application.LoadLevel() pretty much destroys your current scene. Are you sure you want to take that step to pause your game?