Exemple #1
0
 private void Awake()
 {
     console   = GetComponentInParent <GUI_IDConsole>();
     toggle    = GetComponentInChildren <Toggle>();
     netToggle = GetComponentInChildren <NetToggle>();
     //annoyingly, the built in Toggle has no way to just change color when it is selected, so we have
     //to add custom logic to do this
     toggle.onValueChanged.AddListener(OnToggleValueChanged);
     OnToggleValueChanged(toggle.isOn);
 }