使用
renwu = mRoot.transform.Find("Container/Grid/renwu").gameObject;
UIToggle markSprite = renwu.GetComponentInChildren<UIToggle>();//获取UIToggle markSprite.value = true;
//UIToggle markSprite = renwu.GetComponentInChildren<UIToggle>();//获取UIToggle
//markSprite.value = true;
UIToggledObjects toggleObjects = renwu.GetComponentInChildren<UIToggledObjects>(); // 获取 UIToggledObjects
toggleObjects.gameObject.SetActive(true);
时间: 2024-11-08 19:04:33