if (target.GetComponent<Toggle>() != null)
{
target.GetComponent<Toggle>().onValueChanged.AddListener((bool value) => OnToggleClick(target.GetComponent<Toggle>(), value));
}
public void OnToggleClick(Toggle toggle, bool value)
{
if (!AppData.Instance.completeGuids.Contains(id))
{
AppData.Instance.completeGuids.Add(id);
//Debug.LogError("OnToggleClick:" + id);
}
Disable();
}
网友评论