public void Setup() { options = GameObject.Find("options"); optionsController = options.GetComponent <AvatarOptionsController> (); GameObject go = GameObject.Find("body"); AvatarCategoryButton cb = go.GetComponent <AvatarCategoryButton> (); cb.updateMenu(); }
public void updateOption() { GameObject options = GameObject.Find("options"); AvatarOptionsController optionsController = options.GetComponent(typeof(AvatarOptionsController)) as AvatarOptionsController; optionsController.disableAllOptionButtons(); optionsController.loadItemAtIndex(itemIndex); //enable this button GameSound.gameSound.PlaySFX("button"); ToogleButton button = gameObject.GetComponent <ToogleButton>(); button.EnableMenuButton(); }