参考钱康来大神链接:
https://gameinstitute.qq.com/community/detail/120620
如果需要“不可见”的Image作为交互响应的控件直接使用 Button会浪费性能
即Button透明度为0
1.新建一个Button
2.删除 Button上的Image组件
3.添加一个Empty4Raycast脚本
4.使用则和正常调用Button一样
Button.onClick.AddListener(() =>
{
Debug.Log("clicked");
SendMsg(new OnTodoItemSelectedMsg(mModel));
});