privateGameObjectm_GameObject;// Game object hit by the raycast
/// <summary>
/// The GameObject that was hit by the raycast.
/// </summary>
publicGameObjectgameObject
{
get{returnm_GameObject;}
set{m_GameObject=value;}
}
/// <summary>
/// BaseRaycaster that raised the hit.
/// </summary>
publicBaseRaycastermodule;
/// <summary>
/// Distance to the hit.
/// </summary>
publicfloatdistance;
/// <summary>
/// Hit index
/// </summary>
publicfloatindex;
/// <summary>
/// Used by raycasters where elements may have the same unit distance, but have specific ordering.
/// </summary>
publicintdepth;
/// <summary>
/// The sorting group ID when the hit object is influenced by a SortingGroup.
/// </summary>
/// <remarks>
/// For UI.Graphic elements will always be 0.
/// For 3D objects this will always be 0.
/// For 2D objects if a SortingOrder is influencing the same object as the hit collider then the renderers sortingGroupID will be used; otherwise SortingGroup.invalidSortingGroupID.
/// </remarks>
publicintsortingGroupID;
/// <summary>
/// The sorting group order when the hit object is influenced by a SortingGroup.
/// </summary>
/// <remarks>
/// For UI.Graphic elements this will always be 0.
/// For 3D objects this will always be 0.
/// For 2D objects if a SortingOrder is influencing the same object as the hit collider then the renderers sortingGroupOrder will be used.
/// </remarks>
publicintsortingGroupOrder;
/// <summary>
/// The SortingLayer of the hit object.
/// </summary>
/// <remarks>
/// For UI.Graphic elements this will be the values from that graphic's Canvas
/// For 3D objects this will always be 0.
/// For 2D objects if a 2D Renderer (Sprite, Tilemap, SpriteShape) is attached to the same object as the hit collider that sortingLayerID will be used.
/// </remarks>
publicintsortingLayer;
/// <summary>
/// The SortingOrder for the hit object.
/// </summary>
/// <remarks>
/// For Graphic elements this will be the values from that graphics Canvas
/// For 3D objects this will always be 0.
/// For 2D objects if a 2D Renderer (Sprite, Tilemap, SpriteShape) is attached to the same object as the hit collider that sortingOrder will be used.
/// </remarks>
publicintsortingOrder;
/// <summary>
/// The world position of the raycast ray origin.
/// </summary>
publicVector3origin;
/// <summary>
/// The world position of the where the raycast has hit.
/// </summary>
publicVector3worldPosition;
/// <summary>
/// The normal at the hit location of the raycast.
/// </summary>
publicVector3worldNormal;
/// <summary>
/// The screen position from which the raycast was generated.
/// </summary>
publicVector2screenPosition;
/// <summary>
/// The display index from which the raycast was generated.
/// </summary>
publicintdisplayIndex;
/// <summary>
/// Is there an associated module and a hit GameObject.
/// </summary>
publicboolisValid
{
get{returnmodule!=null&&gameObject!=null;}
}
// This code is disabled unless the com.unity.modules.uielements module is present.
// The UIElements module is always present in the Editor but it can be stripped from a project build if unused.