异形按钮点击触发

using UnityEngine;
using UnityEngine.UI;

public class IrregularButton : MonoBehaviour { 
    void Awake () {
        // 设置阈值
        Image image = GetComponent<Image>();
        image.alphaHitTestMinimumThreshold = 0.1f;
    }  
}

挂载该脚本在异性按钮即可

posted @ 2018-10-19 11:26  扎北强子  阅读(404)  评论(0编辑  收藏  举报