Search Unity

Set Cursor Position

Discussion in 'Assets and Asset Store' started by NightmarexGR, Apr 26, 2014.

  1. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Welcome to the "Set Cursor Position" Unity Asset.

    Summary:

    "Set Cursor Position" is an Unity Plugin that gives you the ability to control the actual position of your Hardware (OS) Cursor in your screen via Scripting.
    Not only that but you can also emulate mouse clicks and scrolling !!

    [New] Multi Monitor Support
    [New] Fullscreen Support
    [New] JoyStick Support
    [New] Scrollwheel Support
    There are tons of creative ways to use it and implement it to your games/programms.
    The package comes with 2 Example Scenes and many scripts to help you start and understand its use.
    Can be combined with Unity's current API to achieve great effects !
    Supports: Unity 3x,4x,5x

    What you actually get:

    ~Code examples
    - Canvas & OnGUI Examples
    - Javascript Examples
    - LocalPosition Examples
    - GlobalPosition Examples
    - Store/Load Position Examples
    - JoyStick Example
    - ScrollWheel Example
    - Movement Simulation Examples
    - KeyBinding Examples
    + a few more

    ~Source Code

    ~Forum/Email support
    (As far as its possible and related to the plugin)

    ~New Scripting API.
    -HardwareCursor.SetPosition (Vector2 Pos);
    -HardwareCursor.SetPosition (int x,int y);
    -HardwareCursor.SetLocalPosition (Vector2 Pos);
    -HardwareCursor.SetLocalPosition (int x,int y);
    -HardwareCursor.GetPosition ();
    -HardwareCursor.GetLocalPosition ();
    -HardwareCursor.SetSavesLength (int Saves);
    -HardwareCursor.SavePosition ();
    -HardwareCursor.SavePosition (int SaveNumber);
    -HardwareCursor.LoadPosition ();
    -HardwareCursor.LoadPosition (int LoadNumber);
    -HardwareCursor.SimulateMove (Vector2 FinalPosition,float Speed);
    -HardwareCursor.SimulateMove (int FinalPositionX,int FinalPositionY,float Speed);
    -HardwareCursor.SimulateMove (Vector2 FinalPosition,float Speed,bool Automaticaly);
    -HardwareCursor.SimulateMove (int FinalPositionX,int FinalPositionY,float Speed,bool Automaticaly);
    -HardwareCursor.SimulateAutoMove (Vector2 FinalPosition,float Speed);
    -HardwareCursor.SimulateAutoMove (int FinalPositionX,int FinalPositionY,float Speed);
    -HardwareCursor.SimulateLocalMove (Vector2 FinalPosition,float Speed);
    -HardwareCursor.SimulateLocalMove (int FinalPositionX,int FinalPositionY,float Speed);
    -HardwareCursor.SimulateLocalMove (Vector2 FinalPosition,float Speed,bool Automaticaly);
    -HardwareCursor.SimulateLocalMove (int FinalPositionX,int FinalPositionY,float Speed,bool Automaticaly);
    -HardwareCursor.SimulateAutoLocalMove (Vector2 FinalPosition,float Speed);
    -HardwareCursor.SimulateAutoLocalMove (int FinalPositionX,int FinalPositionY,float Speed);
    -HardwareCursor.SimulateController (float Horizontal,float Vertical);
    -HardwareCursor.SimulateController (float Horizontal,float Vertical,float Speed);
    -HardwareCursor.SimulateSmoothController (float Horizontal,float Vertical,float Speed,float SpeedScale);
    -HardwareCursor.ScrollWheel (int Direction);
    -HardwareCursor.LeftClick();
    -HardwareCursor.LeftClickDown();
    -HardwareCursor.LeftClickUp();
    -HardwareCursor.RightClick();
    -HardwareCursor.RightClickDown();
    -HardwareCursor.RightClickUp();
    -HardwareCursor.MiddleClick();
    -HardwareCursor.MiddleClickDown();
    -HardwareCursor.MiddleClickUp();
    -HardwareCursor.LeftClickEquals(KeyCode KeycodeId);
    -HardwareCursor.RightClickEquals(KeyCode KeycodeId);
    -HardwareCursor.MiddleClickEquals(KeyCode KeycodeId);
    Notes:
    Cursor can be set to go outside of the unity window !!
    It has been tested on Windows Unity Pro and Indie, and windows only, other platforms are unknown! So if you purchase for another platform do it at your own risk !!

    Unity uselful API:
    -Cursor.visible : boolean;
    -Cursor.lockState : CursorLockMode
    -Input.GetKey(KeyCode.Mouse0) // Mouse1 and Mouse2 and so on...
    -Input.GetKeyDown(KeyCode.Mouse0)
    -Input.GetKeyUp(KeyCode.Mouse0)
    and many more...

    Example Uses:
    Simulate mouse movement with external controllers like the ones from PS3 or Xbox.
    Restrict cursor within the window or a certain area.
    Rotate a character with a mouse button and when u press it down turn the cursor invisible and store its position so u can turn it visible and load its position when u release the button.
    Lock the cursor in a desired position not only in the center by constantly calling HardwareCursor.SetCursorPosition() every frame or so.
    Make the cursor teleport in random coordinates.
    and many more, just use your imagination and creativity...

    API Documentation:
    ---------------------------------------------------------------
    "HardwareCursor.SetPosition (int x,int y);"
    This function can be called at any time and requires 2 integers ( int for short ) one for the X coordinate and one for the Y coordinate of the screen.
    Once its called the Cursor will automaticaly teleport to the (GLOBAL) coordinates that was beeing told to go.
    ---------------------------------------------------------------
    "HardwareCursor.SetPosition (Vector2 Pos);"
    Same as above but takes a Vecotor2 instead.
    ---------------------------------------------------------------
    "HardwareCursor.GetPosition ();"
    This function can be called at any time and returns the real cursor values related to your screen and not unity.
    ---------------------------------------------------------------
    "HardwareCursor.SetLocalPosition (int x,int y);"
    This function can be called at any time and requires 2 integers ( int for short ) one for the X coordinate and one for the Y coordinate of the Unity-local screen.
    Once its called the Cursor will automaticaly teleport to the (LOCAL) coordinates that was beeing told to go.
    ---------------------------------------------------------------
    "HardwareCursor.SetLocalPosition (Vector2 Pos);"
    Same as above but takes a Vecotor2 instead.
    ---------------------------------------------------------------
    "HardwareCursor.GetLocalPosition ();"
    Same as Input.mousePosition.
    ---------------------------------------------------------------
    "HardwareCursor.SetSavesLength (int Saves);"
    Is one very basic function to be called if the user wants to use "HardwareCursor.SavePosition (int);" or "HardwareCursor.LoadPosition (int);"
    What it actualy does is to tell the system to create as many Save Slots as the number defined in the brackets.
    That's why it requires 1 integer ( int for short ) to determine the save slots length.
    If you know from the beginning how many save slots you should determine it from the beginning but the new system is automated now so it doesnt really matter :p
    Note: it can be called as many times as you want and at any time although it is recomended to call it once at the Start () function.
    --------------------------------------------------------------
    "HardwareCursor.SavePosition (int SaveNumber);"
    This function can be called at any time and requires 1 integers ( int for short ) that determines the Save Slot you want to save.
    Save Slots are beeing created by the use of "HardwareCursor.SetSavesLength (int);" (Read Above)
    In other words this function will Store the current mouse position so it can be used later with "HardwareCursor.LoadPosition (int);" (Read Below)
    Overwriting an already saved slot is possible and supported !!
    Please note this saves the positions in (GLOBAL) coordinates.
    --------------------------------------------------------------
    "HardwareCursor.SavePosition();"
    It is used as a QuickSave default int value is 0 (zero). In other words it is the same as using "HardwareCursor.SavePosition(0)"
    --------------------------------------------------------------
    "HardwareCursor.LoadPosition (int LoadNumber);"
    This function can be called at any time and requires 1 integers ( int for short ) that determines the Save Slot you want to load.
    Save Slots are beeing created by the use of "HardwareCursor.SetSavesLength (int);" (Read Above)
    In other words this function will Load/Teleport the Cursor to the position that was stored in this Save Slot by "HardwareCursor.SavePosition (int);" (Read Above)
    So it is important to call first "HardwareCursor.SavePosition (int);" and then "HardwareCursor.LoadPosition (int);" or else the default position will be loaded ( 0,0 ).
    Loading the same saved position more than one times is possible and supported !!
    --------------------------------------------------------------
    "HardwareCursor.LoadPosition();"
    It is used as a QuickLoad default int value is 0 (zero). In other words it is the same as using "HardwareCursor.LoadPosition(0)"
    --------------------------------------------------------------
    "HardwareCursor.SimulateMove (Vector2 FinalPosition,float Speed,bool Automaticaly)"
    Once its called the Cursor will start moving toward the coordinates that was beeing told to go.
    This function can be called at any time and requires one Vector2 as the final destination in Global coordinates, one float as the speed value that determines the speed
    of the cursor, one boolean that determines whether the cursor should persist no matter what to go to its final position and stop until it does so or if the function
    should be a one time only meaning that you will have to call it in some form of update (see the example).
    --------------------------------------------------------------
    "HardwareCursor.SimulateMove (int FinalPositionX,int FinalPositionY,float Speed,bool Automaticaly);"
    Same as above but takes 2 integers instead.
    --------------------------------------------------------------
    "HardwareCursor.SimulateAutoMove (Vector2 FinalPosition,float Speed)"
    Same as above but as default the bool is set to true;
    --------------------------------------------------------------
    "HardwareCursor.SimulateAutoMove (int FinalPositionX,int FinalPositionY,float Speed);"
    Same as above but takes 2 integers instead.
    --------------------------------------------------------------
    "HardwareCursor.SimulateMove (Vector2 FinalPosition,float Speed)"
    Same as SimulateMove but as default the bool is set to false;
    --------------------------------------------------------------
    "HardwareCursor.SimulateMove (int FinalPositionX,int FinalPositionY,float Speed);"
    Same as above but takes 2 integers instead.
    --------------------------------------------------------------
    "HardwareCursor.SimulateLocalMove (Vector2 FinalPosition,float Speed,bool Automaticaly)"
    Once its called the Cursor will start moving toward the coordinates that was beeing told to go.
    This function can be called at any time and requires one Vector2 as the final destination in Unity-local coordinates, one float as the speed value that determines the speed
    of the cursor, one boolean that determines whether the cursor should persist no matter what to go to its final position and stop until it does so or if the function
    should be a one time only meaning that you will have to call it in some form of update (see the example).
    --------------------------------------------------------------
    "HardwareCursor.SimulateLocalMove (int FinalPositionX,int FinalPositionY,float Speed,bool Automaticaly);"
    Same as above but takes 2 integers instead.
    --------------------------------------------------------------
    "HardwareCursor.SimulateLocalMove (Vector2 FinalPosition,float Speed)"
    Same as SimulateLocalMove but as default the bool is set to false;
    --------------------------------------------------------------
    "HardwareCursor.SimulateLocalMove (int FinalPositionX,int FinalPositionY,float Speed);"
    Same as above but takes 2 integers instead.
    --------------------------------------------------------------
    "HardwareCursor.SimulateAutoLocalMove (Vector2 FinalPosition,float Speed)"
    Same as SimulateLocalMove but as default the bool is set to true;
    --------------------------------------------------------------
    "HardwareCursor.SimulateAutoLocalMove (int FinalPositionX,int FinalPositionY,float Speed);"
    Same as above but takes 2 integers instead.
    --------------------------------------------------------------
    "HardwareCursor.SimulateController (float Horizontal,float Vertical,float Speed)" --> [RECOMMENDED]
    This function can be called at any time and requires 3 float values one float as the horizontal input , on as the vertical input and one as the speed value that
    determines the speed of the cursor. This function should be called once every frame to work and is frame dependent (see the example).
    --------------------------------------------------------------
    "HardwareCursor.SimulateController (float Horizontal,float Vertical);"
    Same as above but without a speed parameter , this could be used to test controllers raw data.
    --------------------------------------------------------------
    "HardwareCursor.SimulateSmoothController (float Horizontal,float Vertical,float Speed,float SpeedScale)" --> [NOT RECOMMENDED]
    Is like the SimulateController function but a filter is applyied that doent make any visual difference and neither does improve the performance so its not recomended to use this function.
    The filter or "SpeedScale" values should range between 0 and 1.
    Use the SimulateController instead !!
    --------------------------------------------------------------
    "HardwareCursor.ScrollWheel(int Direction)"
    Once called it will keep scrolling with a speed of the set int.
    (Remember , positive values will scoll upwards[forward] and negative values will scroll downwards[backward])
    --------------------------------------------------------------
    "HardwareCursor.LeftClick()"
    A fully left mouse click.
    --------------------------------------------------------------
    "HardwareCursor.LeftClickDown()"
    A left click down - useful for dragging stuff or drag-drop with the keyboard.
    --------------------------------------------------------------
    "HardwareCursor.LeftClickUp()"
    A left click release.
    --------------------------------------------------------------
    "HardwareCursor.RightClick()"
    A fully right mouse click.
    --------------------------------------------------------------
    "HardwareCursor.RightClickDown()"
    A right click down.
    --------------------------------------------------------------
    "HardwareCursor.RightClickUp()"
    A right click release.
    --------------------------------------------------------------
    "HardwareCursor.MiddleClick()"
    A fully middle mouse click.
    --------------------------------------------------------------
    "HardwareCursor.MiddleClickDown()"
    A middle click down.
    --------------------------------------------------------------
    "HardwareCursor.MiddleClickUp()"
    A middle click release.
    --------------------------------------------------------------
    "HardwareCursor.LeftClickEquals(KeyCode KeycodeId)"
    Binds the given keycode as a left mouse. In other words when you press that keycode a left mouseclick will happen, when you release it a left mouse release will happen.
    --------------------------------------------------------------
    "HardwareCursor.RightClickEquals(KeyCode KeycodeId)"
    Binds the given keycode as a right mouse. In other words when you press that keycode a right mouseclick will happen, when you release it a right mouse release will happen.
    --------------------------------------------------------------
    "HardwareCursor.MiddleClickEquals(KeyCode KeycodeId)"
    Binds the given keycode as a middle mouse. In other words when you press that keycode a middle mouseclick will happen, when you release it a middle mouse release will happen.
    --------------------------------------------------------------
    --------------------------------------------------------------
    WATCH THE VIDEO HERE
    GET THE ASSET HERE : "Set Cursor Position"
     
    Last edited: Sep 25, 2016
  2. qemqemqem

    qemqemqem

    Joined:
    Nov 15, 2013
    Posts:
    3
    Does this use a virtual cursor, or does it use the hardware cursor? I'm concerned that the virtual cursor is a little too slow, because Unity updates less frequently than the normal Windows cursor.
     
    crushhh likes this.
  3. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    I am very sorry for my late respond , i got no email notification for your comment.
    Its everything about the Hardware cursor , i use no virtual-unity cursor i just get access to windows and modify the cursor logic so you can then access and modify the cursor position or simulate clicks through unity.
     
  4. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    It's sad that this is a known request for few years, and yet I still need a plugin. Thanks for writing it though. Can I request for SetCursor to be relative to the window. Now it sets it to whole screen, which means I need to get whole screen coordinates too
     
  5. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Yeah i can do that but it will take me some time cause i am working on a professional project right now .
    Thanks for asking me, i will improve this asset in the next few days.
    Although you are already able to do everything , since you can use functions as "ScreenCursor.GetPosition" but i will be make this workaround.
     
    Last edited: Aug 20, 2014
  6. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Sorry for my delay i was very busy these days , by tommorow i will have this finished and update :) Thnx for you patience.

    Edit: Ok i finished updating , all work perfectly !
    I am waiting for Asset Store approval now and i will update the main post for the new features !!!
     
    Last edited: Aug 20, 2014
  7. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    I have gotten many downloads/purchases and i am very happy to see that none reports any problems so far so if anyone thinks that there is something wrong please report it so i can fix it :)
     
    graworg likes this.
  8. a_deadman

    a_deadman

    Joined:
    Jan 20, 2014
    Posts:
    5
    Is it possible to get confirmation this works on Mac, and Linux at least before purchasing ?
     
  9. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    @a_deadman Well as far as i know i am not exactly 100% sure but i think that it will not work on mac or linux , although if i had a mac or a linux i could test and in case it didnt i could fix it.
    So short answer is no :(
     
  10. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    I have been looking all over for a way to use the anolog/joystick on an xbox controller to move the cursor, will this plugin help me do that?
     
  11. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Yes , if you are able to receive input from any analog/joystick then you can move the cursor with that. I have a script in the asset that lets you do exacly that :)

    Edit: if for some reason it doesn't work after purchasing do not worry , I will provide you full support until you are satisfied ;)
     
  12. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    Purchased your plugin. Works great! One thing I want to tweak if possible is the speed/sensitivity when using the gamepad joystick to control the cursor. Is there an easy way to increase this so that I can move the cursor more quickly when using the joystick? Probably a noob question. Thanks!
     
  13. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Yes if you are using the "ScreenCursor.SimulateController" function the 3rd parameter is for speed. In the example script you will find a variable called "Speed" it is set to 5 as default , you can increase that and see the results.
    Thank you for you purchase , if you have any more questions please feel free to post them here or in private :)
     
  14. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    Ahh thanks! I had a feeling it would be something simple like that. Overlooked the setting in the inspector too. :)
     
  15. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    Heya, so I have a bit of an issue. I went to make a test build of a project I have using the plugin. It fails to build due to the Windows.dll, is there some work around for this? Thanks.
     
  16. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    What Unity version do you have ?
    Are you getting this warning "System.Windows.Forms.dll assembly is referenced by user code, but is not supported on StandaloneWindows platform. Various failures might follow." ?
     
  17. petrucio

    petrucio

    Joined:
    Aug 30, 2011
    Posts:
    126
    Just bought it, and ScreenCursor.WindowOffSet is always returning (0,0), and ScreenCursor.SetLocalPosition is not working. The fix for me was to hack my own SetLocalPosition using the global and local positions to calculate the offset:

    Just posting it out there in case it helps anyone with the same problem:

    Code (CSharp):
    1.  
    2.         // Move the cursor back to the center of the screen
    3.         Vector2 posLocal  = ScreenCursor.GetLocalPosition();
    4.         Vector2 posGlobal = ScreenCursor.GetPosition();
    5.         Vector2 offset = posGlobal - posLocal;
    6.         int x = (int) (Screen.width  / 2 + offset.x);
    7.         int y = (int) (Screen.height / 2 + offset.y);
    8.         ScreenCursor.SetPosition(x, y);
    9.  
     
    Last edited: May 19, 2015
  18. petrucio

    petrucio

    Joined:
    Aug 30, 2011
    Posts:
    126
    Actually, there's a big of a nasty reference difference between local and global coordinates that throws a wrench in there. GetLocalPosition origin is on bottom-left and Y grows up, while GetPosition origin is on top-left and Y grows down... Quite annoying. This works:

    Code (CSharp):
    1.  
    2.         // Move the cursor back to the center of the screen
    3.         Vector2 posLocal  = ScreenCursor.GetLocalPosition();    // (0,0) at bottom-left, y grows up
    4.         Vector2 posGlobal = ScreenCursor.GetPosition();            // (0,0) at top-left, y grows down
    5.         float offsetX = posGlobal.x - posLocal.x;
    6.         float offsetY = posGlobal.y - (Screen.height - posLocal.y);
    7.         int x = (int) (Screen.width  / 2 + offsetX);
    8.         int y = (int) (Screen.height / 2 + offsetY);
    9.         ScreenCursor.SetPosition(x, y);
    10.  
     
  19. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Hello putrucio.
    I just tested the plugin in Unity 4.3.4f and both ScreenCursor.WindowOffSet and ScreenCursor.SetLocalPosition work fine. This might be an issue with your Unity version or OS (operating system), so can you please provide me with that information so i can make a patch to prevent other issues with further customers ?
    Thanks for your feedback !!
     
  20. petrucio

    petrucio

    Joined:
    Aug 30, 2011
    Posts:
    126
    I'm using Unity 4.6.4f1, Windows 7 64 SP1 (6.1, build 7601)
    NVidia 660 GTX, driver version 347.09
     
  21. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    That's weird , it should work fine.
    Anyway since you fixed it its ok. But if you have any more issues please tell me so i can help :)
     
  22. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    does it work on Android and IOS ??? i need this effect for drag and drop on Touching System when i am dragging an object, the object is directly under the cursor, it's ok if i use the cursor but if i use touching system on mobile phone it's not good because my finger is closing the object and i don't see a place drop so the way out from situation i think need some offset when i am dragging the object
     
    mimiCryMuffin likes this.
  23. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Well no, it works on windows only so far. But what you need doesn't need my plugin anyway. Getting an offset to the object's position and the touch point isn't that hard, I could help you if you want. Send me a private message if you are interested.
     
  24. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    i use NGUI can u help me???
     
  25. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    I don't know what i need find as i understand NGUI used drag on mouse position so i can make offset for object but interaction occurs within a cursor
     
  26. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Messaged you in private.
     
  27. Hodgson_SDAS

    Hodgson_SDAS

    Joined:
    Apr 30, 2015
    Posts:
    123
    Is this compatible with Unity 5.x?
     
  28. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    @Hodgson_SDAS , yes it is :)
    We provide full support over unity 5 ;)
     
    kevin-kuro likes this.
  29. kevin-kuro

    kevin-kuro

    Joined:
    May 2, 2013
    Posts:
    5
    Hello
    I bought the "set cusor position" yesterday
    Can you Simulate Mouse Scroll Wheel?
    My project Need use Scroll Wheel,thanks.
     
  30. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Hello kevin , thanks for buying ,
    we do not provide such an option but i will make an update in the plugin , i am kinda busy this week but i will do it as fast as possible, if you have the patience to wait.. otherwise i could try sending you the updated scripts though email or something but as i said again i will need a few days..
    I will keep you updated :)
     
  31. kevin-kuro

    kevin-kuro

    Joined:
    May 2, 2013
    Posts:
    5
    OK!Thanks a lot.
    we need simulate Scroll Wheel in our project.
    If you finish update.You can send to kurosaki_hime31@hotmail.com
    The case deadline will coming soon...:(
    ASAP please.Thank you again!!
     
  32. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Email sent !
    Please remember to leave feedback in the asset page if you liked our work to let everyone else know :)
     
  33. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Original post updated , and new version submitted to asset store !
    ~Changes
    -ScreenCursor.ScrollWheel(int);
    -ScreenCursor.MiddleClick();
    -ScreenCursor.MiddleClickDown();
    -ScreenCursor.MiddleClickUp();
    -ScreenCursor.MiddleClickEquals(KeyCode);
     
  34. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    Hey, just now saw your response. I am currently using unity 5, just tried a build after importing cursor position asset and got the following error.

    ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found.
     
  35. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    It seems like you are trying to build a webplayer..
    I don't think it is possible , i will check it out tommorow and report back.

    EDIT: Not possible for me , if u find a way please tell me.
     
    Last edited: Nov 2, 2015
  36. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    Hmm that's strange, I thought my build settings were set to target standalone pc only. But I'll have to check.
     
  37. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Please report back with results so i can help :)
     
  38. aL0nerWolf

    aL0nerWolf

    Joined:
    Apr 8, 2014
    Posts:
    46
    So I checked, and I am currently set for standalone builds. I made a copy of my project and did a build without screen cursor and didn't get the error. This project is in unity version 5.1.0f3 if that makes any difference. Thanks for the help btw.
     
  39. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Are you using anywhere in your scripts a reference to the "WebBrowser" or including a .dll ?
    Because there is Mono.WebBrowser and System.Windows.Forms.WebBrowser and there could be some sort of mix, so if you are using "WebBrowser" try changing it into "Mono.WebBrowser" or "UnityEngine.Mono.WebBrowser". This is my guess.
    Also , did u follow the installation instructions in the .txt ?
    Did you change compatability level from player settings ?

    EDIT: Go to Edit--> Project Settongs --> Player --> Other Settings --> Optimization --> Api Compatability Level --> [Change it to ".NET 2.0"]
     
    Last edited: Nov 21, 2015
  40. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    It's great i reached 150 purchases but come on guys only 6 ratings ?
    Please rate the asset after you buy , if anyone encounters any difficulties support is still available for this asset just pm me or post here :)
     
  41. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    I have followed the installation instructions yet I still get these error messages:

    Assets/Plugins/ScreenCursor.cs(46,86): error CS1729: The type `Point' does not contain a constructor that takes `2' arguments

    Assets/Plugins/ScreenCursor.cs(71,1): error CS0029: Cannot implicitly convert type `System.Drawing.Point' to `Point'

    Assets/Plugins/ScreenCursor.cs(119,28): error CS1503: Argument `#1' cannot convert `object' expression to type `float'

    ...and a whole bunch more.


    I'm on Windows 8, Unity 5.3.4f1 (64-bit).

    Also why aren't you using a singleton? Why do I have to drag the ScreenCursor script into the scene?
     
  42. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Hello, i just came back from holidays please give me a day to review your issues and i will report back here once i get the solutions.
     
  43. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    @NightmarexGR


    Your asset works beautifully when I import it into an empty scene. I think there is a namespace conflict with some other asset. I have tried to import all assets that I use in my project but have yet to find the issue.
     
  44. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    From the errors i can understand that you are using some features from the System.Drawing so try and search which script of yours uses this library , usually its declared in the top lines of the script. If you can't resolve it yourself I could try to help and search with you through skype. I could also try to do some modification in my script to prevent such errors but it wouldn't work in all cases.
     
  45. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    I just found the problem. I updated the EasyRoads 3 beta to the latest version.

    Thank you very much for your offer to help. It works now.
     
    Last edited: Jun 27, 2016
  46. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Good that you resolved it, if you need any help please contact me :)
    Feedback is always appriciated ^_^
     
  47. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    Submitted version 1.7.2 , fixed a few issues with GetLocalPosition and SetLocalPosition , also tried to fix a Unity-Side fullscreen bug
     
  48. artofcom2

    artofcom2

    Joined:
    Dec 29, 2015
    Posts:
    1
    Do you have any plan to support SamsungTV platform ?.. And i'll buy this asset.....
     
  49. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    There are only future plans for mac,linux and android. No samsungTv tho :(
    There is no eta for the above plans since i am taking it slowly but one day i will add them.
     
  50. NightmarexGR

    NightmarexGR

    Joined:
    Jun 7, 2012
    Posts:
    217
    New Version is sent for approval.
    -Many fixes
    -Updated Documentation
    -Added more alternatives to a few functions
    -Fixed Local position issue
     
    zyzyx likes this.