Author Topic: UICheckBox not starting checked?  (Read 1554 times)

SwabbyNat

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
UICheckBox not starting checked?
« on: August 02, 2013, 06:48:54 PM »
So i've been beating my head against this one since yesterday now, and hopefully can get this resolved.

I have modal UI's that turn on/off in the app when switching functionality for the end user.

One of these UI's is our "settings" page. I have multiple GameObjects acting as parents/RadioButtonRoot for the checkboxes in question.

ie: video quality has 3 buttons, with one being set to 'Starts Checked', Sound quality is the same (lo/med/hi), etc, etc.

When the app starts, this UI is not active, and once it is open, the checkbox 'selected' widgets all have a TweenAlpha applied to them with an alpha of zero, regardless of the 'starts checked' option.

Structure in Unity looks like this:

1-UIPanel
    /2-UIGrid
        /3-Collider & UIDragPanelContents
            /4-RadioRoot & UISavedOption
                /5-UIButton, Collider, UIButtonMessage, UIDragPanelContents & UICheckBox
                    /6a-background
                    /6b-checkedSprite
                    /6c-label

So i have multiple #5's, all with their root set to #4, and with only 1 set to be checked, and option can be none is set to false.

Is there something with the setting on/off of #1 above in the game thats screwing with the StartsChecked option? Or is it something else? I've tried leaving #1 as active from the beginning of the project, and its still not respecting the StartsChecked option.

Help is GREATLY appreciated, as i'm about a day away from just coding up some state logic that sets it outside of the UICHeckBox script.

Thanks in advance!

-Nathaniel Hunter

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UICheckBox not starting checked?
« Reply #1 on: August 02, 2013, 08:48:47 PM »
"starts checked" option is set in Awake, and in Start of the UICheckbox script. Are your checkboxes in a group? If so, only one can be active at a time. The easiest way to check what's happening is to add a Debug.Log in the UICheckbox.Set function -- then you will see what's calling it.