public class Player : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Ray ray = new Ray(transform.position+transform.forward, transform.forward);
//bool isCollider = Physics.Raycast(ray);
//bool isCollider = Physics.Raycast(ray, 1);
RaycastHit hit;
//bool isCollider = Physics.Raycast(ray, out hit);
bool isCollider = Physics.Raycast(ray, Mathf.Infinity, LayerMask.GetMask("Enemy1", "Enemy2", "UI"));
Debug.Log(isCollider);
//Debug.Log(hit.collider);
//Debug.Log(hit.point);
}
}