unity 透明图片 Button 按钮 实现 点击透明区域时无效

Image image = GetComponent<Image>();
image.alphaHitTestMinimumThreshold = 0.1f;

 图片要求,  透明图片设置为精灵图, 不透明区域要填充整张图片,    当图片不符合要求时  , 可以用精灵图片的剪裁工具, 处理  。

posted @ 2019-10-15 17:23  GP19  阅读(2410)  评论(0)    收藏  举报