/// <summary> /// 初始化组件 /// </summary> public virtual void Start() { addBtn = transform.Find("Add").GetComponent <Button>(); removeBtn = transform.Find("Remove").GetComponent <Button>(); clearBtn = transform.Find("Clear").GetComponent <Button>(); changValueBtn = transform.Find("Remove[]").GetComponent <Button>(); showData = transform.Find("ShowData").GetComponent <Button>(); addBtn.onClick.AddListener(WatchTableDicAdd); removeBtn.onClick.AddListener(WatchTableDicRemove); clearBtn.onClick.AddListener(WatchTableDicClear); changValueBtn.onClick.AddListener(WatchTableDicChangValue); showData.onClick.AddListener(ShowData); entity = (MemoryTestEntity)FindObjectOfType <MemoryTestDataModel>().DataEntity; }
private void Start() { entity = (MemoryTestEntity)FindObjectOfType <MemoryTestDataModel>().DataEntity; }