浏览代码

fix: renderMode error

renderMode.ScreenSpaceOverlay cause input position calculation error
/main
guanghuispark 3 年前
当前提交
4aa5a623
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs

2
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs


}
Vector2? _getPointerPosition(Vector2 position) {
var worldCamera = canvas.worldCamera;
var worldCamera = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(
rect: rectTransform, screenPoint: position, cam: worldCamera, out var localPoint)) {
var scaleFactor = canvas.scaleFactor;

正在加载...
取消
保存