Author Topic: Draggable Button  (Read 4041 times)

kodagames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Draggable Button
« on: April 15, 2012, 11:41:58 AM »
Hello,

I created a Button then attached the Script "UIDragObject" inside of the inspector I set the Target to this Button to be able to drag it which it does drag when I have it clicked and held down but when I release it the button goes back to its original position.

How would I drag the button so that when I release the mouse button it will stay where I released it?

I also tried the same thing but attached a Sphere to the Target which works fine because Im assuming its a 3d object and has 3d coordinates (unlike a button?) and when released it stays where it was left.

So how would I do the same thing with a button?

Sincerely,
Michael

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Button
« Reply #1 on: April 15, 2012, 03:12:39 PM »
That's likely because you still have UIButtonOffset script attached to the button. Remove it and it should be fine.

kodagames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Draggable Button
« Reply #2 on: April 15, 2012, 09:14:00 PM »
Very Nice Thank you Sir !!! :)