playMaker

Author Topic: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)  (Read 7690 times)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« on: March 05, 2015, 10:18:33 AM »
Unity 5 depreciates some code for Set Mouse Cursor and handles Cursors a bit differently. This should meet your needs when replacing the Set Mouse Cursor action.

I've had some mixed results with the Cursor visibility, so please report any problems with the action along with relevant hardware/software info.

Roger Lee

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #1 on: March 24, 2015, 07:52:52 PM »
Thank you, I came in here today looking for this very thing!!

stigma

  • Junior Playmaker
  • **
  • Posts: 74
    • View Profile
    • Maximages
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #2 on: April 04, 2015, 10:05:39 AM »
I used Set Mouse Cursor with Set Mode cursor and I have some problem with any scene. For example, it's doesn't works in main scene but it's ok for other scene.
Myst-Like WIP :  Cutish

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #3 on: April 04, 2015, 11:46:39 AM »
It seems there are some issues with the new cursor stuff in Unity 5, but no one has tracked them down yet.

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #4 on: May 03, 2015, 09:13:38 AM »
Sorry to be a noob, but how would one apply the workaround? I've tried adding the script to my character controller but it is telling me it needs to be dreived from a Monobehaviour.

Thanks,

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #5 on: May 03, 2015, 09:49:42 AM »
Just drag it into your project folder and it'll appear in the Playmaker Action List.

mdotstrange

  • Hero Member
  • *****
  • Posts: 549
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #6 on: May 28, 2015, 07:42:54 PM »
Thanks so much for this Lane!
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Mentalcase

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #7 on: June 18, 2015, 08:28:37 AM »
I am using this action, but when I test it in the editor, the cursor will jump to the pause button or to the center of a different window in the editor whenever it hovers over an object with a Mouse Pick Event action (at least that seems to be the reason). Any ideas?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #8 on: June 18, 2015, 08:47:56 AM »
Hmm, not really.

There seem to be some problems with the new way Unity handles cursor locking and there isn't much documentation even still. I assume its an issue with varying hardware because not everyone exhibits the same issues, or any issues at all. Often this works just fine so its kind of hard to figure out whats wrong but it doesn't seem to be related to the action from what I can tell and have read on the Unity forums.

Mentalcase

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #9 on: June 18, 2015, 09:25:05 AM »
Ok, I found that it is actually when I go to my reset state on mouse off, it sends an event to my cursor fsm to set it back to default. I have things set up very similar to the "No Exit" Playmaker example. I will also try opening the project on a different machine in case it's a hardware issue. Thank you for the quick response   ;D

Mentalcase

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #10 on: June 18, 2015, 09:47:50 AM »
Yeah, it seems to be hardware related. I will try it on a another PC tonight to be sure, but everything worked perfectly on mac. There was another issue that I have been having with the cursor that didn't seem present on the mac. Thank you for the help.

Mentalcase

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #11 on: June 23, 2015, 08:25:26 AM »
So I tried it on another PC and I was having the exact same problem, but it may be a combined issue with the cursor not behaving properly. This is when I test the game in windowed mode in the editor; it seems to work fine in full screen. I have found some posts online about some people having issues with the cursor in Unity 5 on PC.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #12 on: June 23, 2015, 08:59:27 AM »
Interesting, thanks for following up.

Game Daddy

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #13 on: July 02, 2015, 01:15:50 AM »
Unity 5.1.1 released with a cursor fix for Windows I believe.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #14 on: July 02, 2015, 08:23:30 AM »
Unity 5.1.1 released with a cursor fix for Windows I believe.

I glanced through the patch notes but haven't found anything on it, still seems to be acting up for me.