Author Topic: How to set initial values of Checkboxes & Popup list  (Read 2558 times)

Tuy

  • Guest
How to set initial values of Checkboxes & Popup list
« on: June 23, 2012, 06:26:00 AM »
I have been trying to set the initial value of my checkboxes and my popup list, but I don't seem top be able to.

I've tried the startsChecked property and the isChecked property for the checkbox, but it always defaults to the value for startsChecked that is set in the designer. Not what I set in the 'Start' method of my code.

Same goes for the Popup List. I've tried with the selection property, but here it also always takes the value specified in the designer and not what I set in code in the 'Start' method of the code.

I'm probably forgetting something, but Google couldn't help me.

Anyone ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to set initial values of Checkboxes & Popup list
« Reply #1 on: June 23, 2012, 03:54:38 PM »
You need to do it in Awake, not Start.