Search Unity

Input.GetMouseButtonUp doesn't work in OnMouseOver

Discussion in 'Scripting' started by DexRobinson, Aug 30, 2011.

  1. DexRobinson

    DexRobinson

    Joined:
    Jul 26, 2011
    Posts:
    594
    Just thought I would let everyone know that Input.GetMouseButtonUp doesn't work in OnMouseOver.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Except that's not actually true. It works fine.

    --Eric
     
    djfunkey likes this.
  3. sush333

    sush333

    Joined:
    Jan 26, 2015
    Posts:
    32
    No it doesn't! none of the mouse function is working for me!
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I assume you did something wrong, then, since it works if you use it correctly. But you didn't provide any info so that's the best I can do.

    --Eric
     
  5. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    I'm sure it works if you release the mouse button on the exact frame the cursor enters the collider :)
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    No, the function under discussion is OnMouseOver. Not OnMouseEnter.

    --Eric
     
  7. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Of course. My mistake. Carry on without my snarky barb.
     
  8. sush333

    sush333

    Joined:
    Jan 26, 2015
    Posts:
    32
    none of the onMouse function work for me. Definitely I am doing something wrong. I'll resolve it later.
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    If you typed "onMouseOver", that's why. The names need to be exactly correct.

    --Eric
     
  10. sush333

    sush333

    Joined:
    Jan 26, 2015
    Posts:
    32
    Oh no Eric, haha there is no problem with the name. I checked everything is correct. Actually, i just switched to Unity and that's why i am having such problems. haha
     
  11. sush333

    sush333

    Joined:
    Jan 26, 2015
    Posts:
    32
    who? me? :)
     
  12. _met44

    _met44

    Joined:
    Jun 1, 2013
    Posts:
    633
    Nevermind, i read too fast. You should throw a code snippet to find out what is wrong with your code !