纳金网

标题: 射线 UI 穿透解决办法 [打印本页]

作者: 烟雨    时间: 2015-12-30 23:27
标题: 射线 UI 穿透解决办法

bool CheckIsClickingOnSlider()
    {
        EventSystem eventSys = EventSystem.current;

        // 此处通过名称找到Right Close两个物体
        if (eventSys.currentSelectedGameObject.name == "Right" || eventSys.currentSelectedGameObject.name == "Close")
        {
            return true;
        }
        else
        {
            return false;
        }
    }





欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5