| | |
| | | } |
| | | } |
| | | |
| | | public static bool IsPointerOverGameObject()
|
| | | {
|
| | | if (EventSystem.current == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var eventData = new PointerEventData(EventSystem.current);
|
| | | eventData.pressPosition = Input.mousePosition;
|
| | | eventData.position = Input.mousePosition;
|
| | |
|
| | | var list = new List<RaycastResult>();
|
| | | EventSystem.current.RaycastAll(eventData, list);
|
| | |
|
| | | return list.Count > 0;
|
| | | }
|
| | |
|
| | | struct Quadrangle |
| | | { |
| | | public float minX; |
| | |
| | | |
| | | if (_vertexs == null || _vertexs.Count == 0) |
| | | { |
| | | DesignDebug.Log("非法顶点数据"); |
| | | DebugEx.Log("非法顶点数据");
|
| | | return Vector2.zero; |
| | | } |
| | | |
| | | if (_axis != 0 && _axis != 1) |
| | | { |
| | | DesignDebug.Log("非法轴"); |
| | | DebugEx.Log("非法轴");
|
| | | return Vector2.zero; |
| | | } |
| | | |
| | |
| | | { |
| | | if (quadPositions == null || quadPositions.Length < 4) |
| | | { |
| | | DesignDebug.Log("非法顶点数组"); |
| | | DebugEx.Log("非法顶点数组");
|
| | | return; |
| | | } |
| | | |
| | | if (quadUVs == null || quadUVs.Length < 4) |
| | | { |
| | | DesignDebug.Log("非法UV数组"); |
| | | DebugEx.Log("非法UV数组");
|
| | | return; |
| | | } |
| | | |
| | |
| | | { |
| | | if (positions == null || positions.Length < 3) |
| | | { |
| | | DesignDebug.Log("非法顶点数组"); |
| | | DebugEx.Log("非法顶点数组");
|
| | | return; |
| | | } |
| | | |
| | | if (uvs == null || uvs.Length < 3) |
| | | { |
| | | DesignDebug.Log("非法UV数组"); |
| | | DebugEx.Log("非法UV数组");
|
| | | return; |
| | | } |
| | | |