mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-15 21:00:11 +00:00
完善对多屏幕的支持
This commit is contained in:
@@ -166,6 +166,9 @@ namespace XCharts
|
||||
|
||||
public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)
|
||||
{
|
||||
#if ! UNITY_EDITOR
|
||||
screenPoint = Display.RelativeMouseAt(screenPoint);
|
||||
#endif
|
||||
var cam = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
||||
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform,
|
||||
screenPoint, cam, out chartPoint))
|
||||
|
||||
Reference in New Issue
Block a user