Author Topic: How can I simulate hover with mobile touch?  (Read 1912 times)

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
How can I simulate hover with mobile touch?
« on: October 29, 2016, 09:21:13 AM »
I want to have hover events on objects I pass when dragging the finger on the screen, Just like it was a mouse cursor that triggers the OnHover event.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can I simulate hover with mobile touch?
« Reply #1 on: October 30, 2016, 12:48:36 PM »
You will get OnDragOver and OnDragOut notifications on those objects. UIButton.dragHighlight controls what happens with that -- whether the button will get highlighted. Just set that to true in inspector.

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: How can I simulate hover with mobile touch?
« Reply #2 on: November 13, 2016, 02:15:06 AM »
You will get OnDragOver and OnDragOut notifications on those objects. UIButton.dragHighlight controls what happens with that -- whether the button will get highlighted. Just set that to true in inspector.

Thanks works great!