public class Demo : MonoBehaviour
{ private Toggle toggle; void Start ()
{ toggle.onValueChanged.AddListener((bool isOn)=> { OnToggleClick(toggle,isOn); }); } private void OnToggleClick(Toggle toggle,bool isOn) { //TODO } }
标签:点击,void,OnToggleClick,Toggle,private,isOn,toggle,事件 From: https://www.cnblogs.com/gatran/p/17406191.html