Author Topic: [SOLVED]Mouse disappears when playing scenes with NGUI  (Read 1811 times)

cyangamer

  • Guest
[SOLVED]Mouse disappears when playing scenes with NGUI
« on: July 04, 2013, 06:10:18 PM »
Hello, hope everyone's doing well!

I'm having an issue where my mouse keeps disappearing whenever I start up a scene, making playtesting virtually impossible. After finding this topic, I found the cause of the problem. Unfortunately, ExecuteInEditMode is required in order for the UIs to display when you're trying to build and design them in Edit Mode. However, in this current state, I can't test my game! Quite a tough situation.

Does anyone know of a workaround so that the mouse will stop disappearing during gameplay?
« Last Edit: July 07, 2013, 01:17:45 PM by cyangamer »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Mouse disappears when playing scenes with NGUI
« Reply #1 on: July 05, 2013, 08:11:33 AM »
Eh? What version of NGUI, what version of Unity? You're the first person running into it. The cursor will never disappear unless you tell it to. My guess is that you have some script that does exactly that (Screen.showCursor = false).

cyangamer

  • Guest
Re: Mouse disappears when playing scenes with NGUI
« Reply #2 on: July 07, 2013, 11:27:45 AM »
I'm using the free version of NGUI (version 2.0.7c) with Unity 4.1.5. I did read that ExecuteInEditMode often makes the cursor disappear for seemingly no reason when playtesting. Though, I will search my scripts to see if such a command (Screen.showCursor = false) is in my scene somewhere. It definitely would not be something I coded.

EDIT: Found it and killed it. What's odd is that, when I made a new scene with NGUI and the offending script, the 'Screen.showCursor = false' line didn't appear to have an effect. Anyway, issue's fixed now. Thanks for helping me find the true cause ArenMook! Your script really is great.
« Last Edit: July 07, 2013, 01:23:39 PM by cyangamer »