使用
renwu = mRoot.transform.Find("Container/Grid/renwu").gameObject;
UIToggle markSprite = renwu.GetComponentInChildren();//获取UIToggle markSprite.value = true;
//UIToggle markSprite = renwu.GetComponentInChildren<UIToggle>();//获取UIToggle
//markSprite.value = true; UIToggledObjects toggleObjects = renwu.GetComponentInChildren<UIToggledObjects>(); // 获取 UIToggledObjects toggleObjects.gameObject.SetActive(true);