Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: cheerbase on May 22, 2012, 01:59:45 AM
-
I use several UICheckboxs to form a Radio Group.Everything is perfect.
But how can i choose a specify checkbox with scripts?
-
I am not quite sure if this will answer your question, but you can get at a specific IUCheckBox if you have many by doing the following:-
UICheckbox[] checkbox_list = TheMenuObj.GetComponentsInChildren<UICheckbox>();
foreach (UICheckbox checkbox in checkbox_list)
{
if (checkbox.name == "My CheckBox Name")
{
// Do something
}
}
-
And remember, UICheckbox.current will always tell you the checkbox that fired the event in your OnActivate function calls.