Page 2 of 3
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 10:42 am
by Tony Li
The Dialogue System's example scenes don't do anything with the cursor. They just leave the cursor untouched (visible) the whole time.
Are you using your HideLockMouse script and the pause menu at the same time? They'll step on each others' toes. As a test, try removing HideLockMouse and anything else that controls the cursor except for the UI/pause menu. Then test it out. Don't engage in a conversation yet. Let's make sure everything is working perfectly in the editor and a build before bringing conversations into the mix.
If it's still not behaving, can you put together an example reproduction project and send it to tony (at) pixelcrushers.com?
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 10:56 am
by supadupa64
If I just use the ui by itself and nothing else, the cursor shows the whole time. I don't know if it matters, but I've never been able to pull up the menu or pause menu in my main scene editor play. Maybe that's because my menu and pause menu ui are in a different scene hierarchy?
Actually never mind, I played in editor mode from my ui scene and clicked start to enter my other scene and I can now pull up the pause menu. Nice, this should be a lot faster than making a build every time.
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 11:47 am
by Tony Li
supadupa64 wrote:If I just use the ui by itself and nothing else, the cursor shows the whole time. I don't know if it matters, but I've never been able to pull up the menu or pause menu in my main scene editor play. Maybe that's because my menu and pause menu ui are in a different scene hierarchy?
Actually never mind, I played in editor mode from my ui scene and clicked start to enter my other scene and I can now pull up the pause menu. Nice, this should be a lot faster than making a build every time.
Great! What happening with the cursor now?
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 11:51 am
by supadupa64
Actually the same thing as at first. Everything works except if I hit ESC a second time the cursor shows indefinitely. The cursor functions perfect if I select "leave" or "close" or "resume," but if I try to cancel the UI or a dialogue using ESC, it shows the cursor forever.
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 12:23 pm
by Tony Li
Did you try removing HideLockMouse before playing?
I'll try reproducing this later today with the menu template prefab and TPC.
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 12:40 pm
by supadupa64
Yeah I've tried it a lot of times, quite a few different ways. The solution has to be close... I disabled the TPC, but then it's kind pointless since I need it to disable cursor in game anyhow, and the menu isn't doing it. I really appreciate the help.
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 12:45 pm
by Tony Li
Okay, I'll try to reproduce it here. If possible, please put together a reproduction project and send it to me. Otherwise I'll just use the vanilla TPC and menu template setups.
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 10:32 pm
by Tony Li
It's Third Person Controller. When you press Escape, it always show the cursor. For the next release, I'll ask Justin to add a way to disable this functionality. In the meantime,
import the TPC source code. Then edit UnityInput.cs and change line 161 from this:
Code: Select all
if (UnityEngine.Input.GetKeyDown(KeyCode.Escape)) {
to this:
Code: Select all
if (false && UnityEngine.Input.GetKeyDown(KeyCode.Escape)) {
Re: Show/Hide mouse on ESC for menu
Posted: Thu Apr 28, 2016 11:58 pm
by supadupa64
That did work, however, I now have thousands of errors and tons of lag. I changed it all back in the meantime.
Re: Show/Hide mouse on ESC for menu
Posted: Fri Apr 29, 2016 9:24 am
by Tony Li
Justin's putting the change in TPC 1.3.
Regarding the errors and lag, did you remember to remove the Scripts folder before importing the source package?