- Home /
Mouse cursor not loading on scene reload
I have a scene that pops up when the player dies. In that scene, there is a button that requires a click of the mouse. If I load the scene from the editor as the first scene, the mouse cursor is visible and can click the button. However, if I load the scene by dying, then the cursor is not visible. First, I tried to fix it by calling Cursor.Visible
under start. Then, I tried to call it every update. Neither of these showed the slightest hint of working.
Some Details that may help:
I load the scene with an animation event
I am using the standard assets non-rigidbody Fps controller, which hides the cursor in the scene before
For some reason, I am also unable to hit the button using the event manager and a keyboard
I literally upgraded from 5.6 to 2018.2 yesterday
Bonus question:
Is there a way to preload scenes? It takes way too long to get from the death to game over screens and it kinda breaks the flow of the game.
Answer by kSiasios · Apr 30, 2020 at 10:36 AM
Hey! I know I'm somewhat late, but I've been struggling with this the past few hours. So, I created a new scene and placed everything from my prefab folder, including my UI elements. When I pressed play, my mouse was not responding. After a few hours of searching an getting mad, it turned out that, being new to Unity , I hadn't added the EventSystem, causing my mouse, or better my buttons and UI, to not respond to my clicks. So for anyone with a similar problem, try adding the EventSystem. To do so, right click at the Hierarchy panel ==> UI ==> Event System.
Your answer
Follow this Question
Related Questions
How do I keep a Custom Cursor (GUITexture) on top of UnityGUI controls? 3 Answers
Unity 2017.2 Standard assets 0 Answers
Character not moving on slopes 1 Answer
w Key - Character Jumps 1 Answer
Modifing Standard Assets FPC to swim 0 Answers