Author Topic: Q:can not change UIToggle State by code (fixed)  (Read 2342 times)

chaosngui

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Q:can not change UIToggle State by code (fixed)
« on: November 07, 2014, 03:43:52 AM »
var tab0 = GameObject.FindGameObjectWithTag("Tab0").GetComponent<UIToggle>();
            tab0.value = true;
it works and the state of tab0 changed to be checked;

var tab1 = GameObject.FindGameObjectWithTag("Tab1").GetComponent<UIToggle>();
            tab1.value = false;
this doesn't work,and tab1 is still checked.

fixed: allow to choose none  ::)
« Last Edit: November 07, 2014, 03:51:34 AM by chaosngui »