Author Topic: Checkbox firing OnValueChange when 'tweened'  (Read 4799 times)

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Checkbox firing OnValueChange when 'tweened'
« on: March 05, 2014, 02:33:48 PM »
I have a number of checkboxes (UIButton, UIToggle etc) grouped under a tween, so that when I click on a header they expand and I can change as necessary (see attached screenshot). However the first time I expand them each fires the OnValueChange. This only happens the first time, every other time they just expand as I'd expect. This unexpected behavior is annoying as I need to know each time a user actually changes one of the checkboxes. Any idea on what I'm missing

thanks
Paul

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Checkbox firing OnValueChange when 'tweened'
« Reply #1 on: March 06, 2014, 08:44:09 AM »
OnValueChange fires when the checkbox starts up. It's the same as a similar event on the slider, for example. It's this way for consistency so that whatever data you has associated with the value is set properly on start.