Author Topic: UIButton onclick delay issue  (Read 2185 times)

doncarlos91

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 27
    • View Profile
UIButton onclick delay issue
« on: January 16, 2017, 05:20:05 AM »
Hi Guys,

i have a some problem with my button onclick method (maybe)

#1 In Unity Editor , when im attaching the pressedSprite to UIbutton -  touch effect works perfect, but when i`m trying to set the tween colour to pressed state of button , and when i`m running it to my Android device , the pressed view touch effect appears after 1 second approximately

 here is my screenshot with my button settings

Any Suggestions?

doncarlos91

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: UIButton onclick delay issue
« Reply #1 on: January 16, 2017, 07:01:15 AM »
Hi Guys,

i have a some problem with my button onclick method (maybe)

#1 In Unity Editor , when im attaching the pressedSprite to UIbutton -  touch effect works perfect, but when i`m trying to set the tween colour to pressed state of button , and when i`m running it to my Android device , the pressed view touch effect appears after 1 second approximately

Any Suggestions?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIButton onclick delay issue
« Reply #2 on: January 18, 2017, 09:09:10 AM »
Button script adds a tween to the sprite. You can't tween the same sprite's color that's affected by the button. Either color a different sprite, or don't use the button script.

doncarlos91

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: UIButton onclick delay issue
« Reply #3 on: January 20, 2017, 04:17:32 AM »
Hi Aren , thanks for you reply, i have fixed that issue by setting the transition = 0 and it solved my visual effect problem :)