Search Unity

Changing cursor

Discussion in 'Editor & General Support' started by A Meat Coder, Apr 23, 2015.

  1. A Meat Coder

    A Meat Coder

    Joined:
    Apr 22, 2015
    Posts:
    7
    Is there a way to change the "image" a cursor has when hovering a unity element on a browser without having access to the source code?



    (Forgive the size of the image, I can't make the height and width attributes work xD)

    Let's say my awesomely drawn number 1 is the unity object, number 2 is the rest of the website and the dot is my pointer. Using JavaScript, I can change the looks of my cursor over 2, but as of yet, I can't make it work when hovering 1. Is it possible to so it? If so, how can I?

    P.s.: on a side note, how can I change my username? The autocorrect screwed me up xD
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Well, if the inner box is a Unity web application, and the outer box is a web page, then I think you are asking how you can change the cursor when it leaves the Unity app. I imagine CSS or jQuery will be needed to detect where the cursor is and make changes.

    PM me about your username.
     
  3. A Meat Coder

    A Meat Coder

    Joined:
    Apr 22, 2015
    Posts:
    7
    This is the case. The part in blue is the unity web application and the rest is a web page as you said


    Now I can easily change my cursor's looks on the outer box with something like

    javascript:$('embed').css('cursor','url(http://www.someurl.com/image.gif),auto');

    However, this doesn't seem to work, no matter what tag I use (also tried manually adding an id to the object to try to select it and change the cursor's image) But it still looks as "it should" in the game
    [/IMG]

    Is it possible to change it or am I trying too hard? xD
     
  4. A Meat Coder

    A Meat Coder

    Joined:
    Apr 22, 2015
    Posts:
    7
    So... Impossible?