Forum rules - please read before posting.

Cursor issues

edited November 2014 in Technical Q&A
I have multiple cursor issues I would like to bring up.

1. Hardware cursor does not even draw the cursor when the game is built. It draws the cursor fine in the editor. This forced me to go back to Software which feels a tad sluggish.

2. My wait cursor is animated. It takes a png size 256x32 that has 7 frames of animation. It does have extra alpha space for the last 1/3 of it. The result is the cursor is rotated and obviously not pulling from the texture correctly. I read the manual and it said to have the textures lined up horizontally in a texture. Thoughts?

3. I want hotspots that leave the scene to change its cursorwhen hovering over them. I have setup a new cursor for this. My mode is choose interaction then hotspot. Under settings -> hotspot settings if I choose Display Hotspot Icon -> only When highlighing, then it shows the cursor icon associated with the interactions supported by the hotspot over every hotspot regardless if my mouse is over the hotspot. I also noticed a HUGE performance decrease while this was happening. Is there an option for changing the cursor when the cursor is over a hotspot?

4. For my own knowledge, why must cursors be Texture2Ds and not sprites?

Thanks folks. This is on Unity 2D mode.

Comments

  • 1) I too had hardware cursor issues but they occurred in the editor playback. Chris has said there's a fix for it in the next version. Should be out soon, see what happens then.

    2) If you have 7 frames you should make sure your png divides into 7. So 224x32. That extra space isn't helping. That said you should probably do 8 frames because it isn't saving you anything to use only 7 so if it's easy enough, add another frame to your animation to use the full space of 256.

    3) I have a cursor which animates when you mouse over the area where there is a hotspot. It doesn't show any interactions until you click on the hotspot. Is this what you want? I can post an image of my settings if it is. Just let me know.

    4) Because the present Unity GUI methods use textures and not sprites. The new Unity 5 (or 4.6 beta) UI will be different and the options will likely open out.
  • Thanks for the help Xidore.

    As for #3 I want to elaborate more. I want the right click to change cursor for interaction, however when you hover over a hotspot that is used for changing scenes, I want the cursor to immediately change to a preset cursor for "ExitRight" and thus be able to have the 'ExitRight" interaction for use in the hotspot logic.
  • Is this an effect similar to the 2D Demo game's left-and-right exit Hotspots?  If so, you can check Single 'Use" interaction? in the Hotspot's inspector to do that.
  • edited November 2014
    Chris, Yes exactly like the 2D Demo;s left and right hotspots. The issue however is I want to Right-click to alternate between three interactions/cursors:

    1. Use
    2. Look At
    3. Walk

    Thus I have set Choose Interaction Then Hotspot. However when hovering over this particular hotspot "ExitRight" with a single use action, that the cursor would immediately change to Walk and then clicking on the hotspot would use the Walk: ExitRight interaction.

    In order to get the 2D Demo to work like this I had to change its setting to Choose interaction Then Hotspot, which caused the right-click-cycle to include the two arrows and didn't change the cursor upon mouse-over either.

    In other words be able to Right-click to cycle, but then declare a particular hotspot that upon mouse over you only respond to "Walk" and thus the cursor changes to Walk on mouseover and changes back if the mouse leaves the hotspot.

    Also an update on question #1, the cursor wasn't showing as the Texture type was not set to "Cursor".

    Thoughts?
  • I will see about adding the 2D demo's "side exit" feature to Choose Interaction Then Hotspot mode.

    I'll need a refresh on 1).  Does the update solve the issue?
  • For #1, it was my own fault. I had the textures set to Sprite and not as Cursor in their settings.

  • Chris, I did notice that hardware cursor mode does not support changing its size. Any thoughts on this?
  • Unity requires that the hardware cursor is the same size as it's texture.  You'd have to change the size of the source image itself.
  • Thanks Chris. That is fair enough.
  • Hi Chris !
    Ufortunetly in my case when I use "Hardware Cursor" option it's size cant be changed that way (2x larger image for cursor makes no difference - cursor is tiny...).

    Also when I take any item from inventory its verry tiny (when cursor is in "software" mode) size of items is ok.
    Any ideas ?
     It would be great to run hardware curors becouse it moves much smoother (but now with those problems its impossible :/).



  • As the Hardware rendering option relies on Unity's Cursor.SetCursor function, the issue is likely one to do with Unity and the way your graphic is imported, rather than AC.

    Check your texture import settings - make sure the Texture Type is set to Cursor, and that the Max Size value is large enough.

    If you switch back to Software, Inventory items can be assigned dedicated cursor graphics in the Inventory Manager, so that you can control their size exactly.
  • edited February 2017
    Unfortunetly that does nothing as well...
    :/
    (max size is set to 2048 guess its big enough ?)
    cursor option checked...

    software is verry sluggish unfortunetly - that why I would love to get hardware to work properly...
  • Im using AC version 1.53d
    and Unity Personal 5.3.5f1
  • I even tried to export cursor in high dpi (144 instead of 72), but nothing has changed - it was even worse (it is sizing it down to some "hardware" size I guess).
    Where esle can I made any changes ?

    Ah and 1 thing (maybe important) Im using windows 10 64 bit

  • You could try assigning a Default Cursor graphic in Unity's Player settings (Edit -> Project Settings -> Player).  It may be that setting that dictates what size Unity sets all cursors.  Otherwise, this may be a question for the Unity forums.
  • Ok,
    Thanks,
    Guess for now I just must to stick to Software solution.
    Maybe I will make hardware to work properly later on during development 
    (my testers are complaining that cursor is sluggish :/)

    Is there any chance that software rendering of cursor will be improved (less lag ?)
    ;]
    It wuld be fantastic

  • It's as fast as it can be - though you're not using the latest version, v1.55c.  Altering the texture import settings may help to improve things - you shouldn't get noticeable lag with any kind of cursor, generally.

    Further performance enhancements are coming with v1.56 - though not specifically with cursors, overall they may help to lessen the lag.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.