Search Issue Tracker
Fixed in 7.1.1
Votes
4
Found in [Package]
6.7.0
Issue ID
1174310
Regression
No
[2d] [Pixel-Perfect] [LWRP] Using Crop X and/or crop Y makes it difficult to click on UI elements
[2d] [Pixel-Perfect] [LWRP] Using Crop X and/or crop Y makes it difficult to click on UI elements
The new LWRP PixelPerfectCamera has undesired behaviour when crop X and/or crop Y are enabled! Can't click UI elements easily
Steps to Repro:
1. open attached project
2. go to the Main Camera and disable Crop Frame X and Y
3. build and run the project at 1920x1080
4. click on the options cog (top left corner) and it should activate fine
5. enable Crop Frame X and Y and build/run again at 1920 x 1080
6. click on the options cog
Result: It's difficult and not accurate to click on the button; it seems like you have to click and take into to account the cropping distances. It is hard to click other UI elements in the game as well.
-
LordDarkenon
Sep 24, 2019 14:37
I agree this is an issue. I spent several hours trying to work out the cause of this, when upgrading to the LWRP in my 2D game. The 'm_Camera.pixelRect = finalBlitPixelRect;' fix reported above does seem to solve the issue, but as stated I'm unsure about any knock on effects. This LWRP is far worse than the built in renderer for my 2D game. Frame rates drop from 620fps to around 400fps simply by adding the LWRP and enabling 'new 2D Renderer Data' for the Custom renderer type. This drop in performance is widely reported for 2D games - Unity needs to resolve this.
-
VPellen
Aug 30, 2019 12:14
I believe this is caused by the camera's pixelRect not being set properly after rendering. I managed to fix the problems I was having by adding the following line -
m_Camera.pixelRect = finalBlitPixelRect;
- to the PixelPerfectCamera.OnEndCameraRendering() method. (Line 183 in PixelPerfectCamera.cs at the time of writing). I have no idea if there are negative side-effects to this, but none were readily apparent.
-
exzizt
Aug 29, 2019 18:28
This is a major issue. I hope this is being fixed soon. https://fogbugz.unity3d.com/default.asp?1174310_tp6t4n897iku4qtb
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Physics.IgnoreCollision" is not respected when used with "Rigidbody.SweepTest"
- GridView does not update with new items when added at runtime until Aspect Ratio is changed
- [iOS] WebGL Player crashes when using certain iOS devices
- Bad performance when executing the Physics.IgnoreCollisions() method while in Play Mode
- Sprite Editor has a thicker separator between buttons when "Sprite Editor" option is selected
Resolution Note (fix version 7.1.1):
Fixed in Upcoming Universal Render Pipeline v7.1.1