123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- namespace UnityEngine.EventSystems
- {
-
-
-
- public struct RaycastResult
- {
- private GameObject m_GameObject;
-
-
-
- public GameObject gameObject
- {
- get { return m_GameObject; }
- set { m_GameObject = value; }
- }
-
-
-
- public BaseRaycaster module;
-
-
-
- public float distance;
-
-
-
- public float index;
-
-
-
- public int depth;
-
-
-
-
-
-
-
-
- public int sortingLayer;
-
-
-
-
-
-
-
-
- public int sortingOrder;
-
-
-
- public Vector3 worldPosition;
-
-
-
- public Vector3 worldNormal;
-
-
-
- public Vector2 screenPosition;
-
-
-
- public int displayIndex;
-
-
-
- public bool isValid
- {
- get { return module != null && gameObject != null; }
- }
-
-
-
- public void Clear()
- {
- gameObject = null;
- module = null;
- distance = 0;
- index = 0;
- depth = 0;
- sortingLayer = 0;
- sortingOrder = 0;
- worldNormal = Vector3.up;
- worldPosition = Vector3.zero;
- screenPosition = Vector3.zero;
- }
- public override string ToString()
- {
- if (!isValid)
- return "";
- return "Name: " + gameObject + "\n" +
- "module: " + module + "\n" +
- "distance: " + distance + "\n" +
- "index: " + index + "\n" +
- "depth: " + depth + "\n" +
- "worldNormal: " + worldNormal + "\n" +
- "worldPosition: " + worldPosition + "\n" +
- "screenPosition: " + screenPosition + "\n" +
- "module.sortOrderPriority: " + module.sortOrderPriority + "\n" +
- "module.renderOrderPriority: " + module.renderOrderPriority + "\n" +
- "sortingLayer: " + sortingLayer + "\n" +
- "sortingOrder: " + sortingOrder;
- }
- }
- }
|