using System;
namespace UnityEngine.EventSystems
{
public struct RaycastResult
{
//
// Fields
//
public BaseRaycaster module; // BaseInputModule that raised the hit.
public float distance; // Distance to the hit.
public float index; // Hit index.
public int depth; //The relative depth of the element.
public int sortingLayer; // The SortingLayer of the hit object. 官方解释的这两个一样,完全不明白
public int sortingOrder; // The SortingOrder for the hit object.
public Vector3 worldPosition; // The world position of the where the raycast has hit.
public Vector3 worldNormal; // The normal at the hit location of the raycast.
public Vector2 screenPosition; // The screen position from which the raycast was generated.
//
// Properties
//
public GameObject gameObject { // The GameObject that was hit by the raycast.
get;
set;
}
public bool isValid { // Is there an associated module and a hit GameObject.
get;
}
//
// Methods
//
public void Clear ();
public override string ToString ();
}
}