yyl
12 小时以前 5d3366f2e0f687995eb7ad2107c4379fe7acd4e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//--------------------------------------------------------
//    [Author]:           玩个游戏
//    [  Date ]:           Monday, July 02, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
 
 
    public class CanvasRaycastFilter : MonoBehaviour, ICanvasRaycastFilter
    {
 
        [SerializeField] bool m_RaycastTarget = true;
        public bool raycastTarget { get { return m_RaycastTarget; } set { m_RaycastTarget = value; } }
 
        public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
        {
            return raycastTarget;
        }
 
    }