playMaker

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

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« on: March 05, 2015, 12:18:33 PM »
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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Roger Lee

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

stigma

  • Full Member
  • ***
  • Posts: 176
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #2 on: April 04, 2015, 01:05:39 PM »
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.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #3 on: April 04, 2015, 02:46:39 PM »
It seems there are some issues with the new cursor stuff in Unity 5, but no one has tracked them down yet.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #4 on: May 03, 2015, 12:13:38 PM »
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: 2511
  • Mender of the past
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #5 on: May 03, 2015, 12:49:42 PM »
Just drag it into your project folder and it'll appear in the Playmaker Action List.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • 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, 10: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
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #7 on: June 18, 2015, 11: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: 2511
  • Mender of the past
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #8 on: June 18, 2015, 11: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Mentalcase

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #9 on: June 18, 2015, 12:25:05 PM »
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
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #10 on: June 18, 2015, 12:47:50 PM »
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
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #11 on: June 23, 2015, 11: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: 2511
  • Mender of the past
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #12 on: June 23, 2015, 11:59:27 AM »
Interesting, thanks for following up.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Game Daddy

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

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Set Cursor Mode - Replacement for Set Mouse Cursor (Unity 5)
« Reply #14 on: July 02, 2015, 11: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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D