Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Votes

0

Found in

2019.4

2019.4.18f1

2020.3

2021.1

2021.2

Issue ID

1329240

Regression

No

Camera.WorldToScreenPoint is producing different behavior with dynamic resolution

Camera

-

Reproduction steps:
1. Open attached project "DynamicResolutionRenderTexture.zip" and scene "DynamicResolution"
2. Enter Play Mode
3. In Game View, press the "Scale down" and "Set RT not null" buttons
4. In Scene View, move the "Cube" GameObject around
5. Observe Canvas/AttachedImage GameObject in Game View and Inspector/RectTransform
6. If there is no change, adjust the scale by pressing the "Scale up" and "Scale down" buttons

Expected result: The AttachedImage GameObject follows the cube exactly
Actual result: The AttachedImage GameObject follows the cube at an offset

Reproducible with: 2019.4.24f1, 2020.3.4f1, 2021.1.4f1, 2021.2.0a13
Could not test with: 2018.4.34f1 (console errors break project)

Workaround:
Removing lines 32-35 in AttachUIToWorld.cs fixes the issue.

  1. Response avatar

    Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0a21

    When dynamic scaling is enabled and a Render Target is attached to a Camera the ScreenTo and ToScreen functions no longer use the scaled viewport size, instead match the behaviour when a Render Target isn't attached as per the documentation.

  2. Response avatar

    Resolution Note (fix version 2021.1):

    Fixed in 2021.1.16f1

  3. Response avatar

    Resolution Note (fix version 2020.3):

    Fixed in 2020.3.16f1

  4. Response avatar

    Resolution Note (fix version 2019.4):

    Fixed in: 2019.4.30f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.