Question by
srhdaninja · Jun 16, 2018 at 02:43 AM ·
cursorpausepause menufirst-personfirstpersoncontroller
My cursor is gone when I go from my fps scene to the main menu.
I think this question has been answered previously but I really don't understand how to fix it. I'm semi-new to coding and Unity in general. Anyways here's my issue. I'm making a first person game and I followed this tutorial to make pause menu.
( https://www.youtube.com/watch?v=JivuXdrIHK0 )
Everything works well, except now when I pause and choose to go to the main menu, the mouse cursor doesn't show up and I can't see what I'm selecting. Any help would be extremely appreciated. Thank's in advance.
Pause Menu Script: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement;
public class PauseMenu : MonoBehaviour {
public static bool GameIsPaused = false;
public GameObject pauseMenuUI;
void Update () {
if (Input.GetKeyDown(KeyCode.Escape))
{
if (GameIsPaused)
{
Resume();
} else
{
Pause();
}
}
}
public void Resume ()
{
pauseMenuUI.SetActive(false);
Time.timeScale = 1f;
GameIsPaused = false;
}
void Pause ()
{
pauseMenuUI.SetActive(true);
Time.timeScale = 0f;
GameIsPaused = true;
}
public void LoadMainMenu()
{
Time.timeScale = 1f;
SceneManager.LoadScene("MainMenu");
}
public void QuitGame()
{
Debug.Log("Player Quit");
Application.Quit();
}
}
Comment