Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1312646][1321306] Correctly initialize pixel perfect camera rect on awake + Fix wrong orthoSize being updated #4513

Merged
merged 11 commits into from
May 31, 2021

Conversation

kennytann
Copy link
Contributor

@kennytann kennytann commented May 12, 2021

Purpose of this PR

1312646 - Pixel perfect camera's rect was not getting properly initialized. Systems or users depending on the camera's size are unable to retrieve the correct values.

1321306 - Fixed a bug where the pixel perfect camera was updated with the wrong ortho size due to it using the scene view's camera


Testing status

FB: https://fogbugz.unity3d.com/f/cases/1312646/

Ensure Pixel Perfect Camera Height is correct on Start() in scripting.

FB: https://fogbugz.unity3d.com/f/cases/1321306/

Ensure Game view is not longer zoomed in when selecting the main camera in the scene hierarchy.


Comments to reviewers

Notes for the reviewers you have assigned.

@kennytann kennytann requested review from a team as code owners May 12, 2021 03:58
@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@kennytann kennytann added the 2d label May 12, 2021
@kennytann kennytann self-assigned this May 12, 2021
@kennytann kennytann changed the title Correctly initialize pixel perfect camera rect on awake [1312646] Correctly initialize pixel perfect camera rect on awake May 12, 2021
@kennytann kennytann changed the title [1312646] Correctly initialize pixel perfect camera rect on awake [1312646][1321306] Correctly initialize pixel perfect camera rect on awake + Fix wrong orthoSize being updated May 19, 2021
@BoonKiangTan
Copy link

Fix verified on branch:

Version: 2021.2.0a17.2411
Revision: trunk 96ee4da88f82
Built: Sat, 08 May 2021 00:51:07 GMT
Package branch: 2d/init-pp-cam-rect (17f331b)

case 1312646: Verified using user project, all 3 frames of debug logs are consistent at "0.8888889"
case 1321306: Verified UI in the Game view is not zoomed-in in playmode when selecting the "Main Camera" GameObject in scene

@kennytann kennytann requested a review from unity-cchu May 20, 2021 04:09
@kennytann kennytann merged commit 8112a6e into master May 31, 2021
@kennytann kennytann deleted the 2d/init-pp-cam-rect branch May 31, 2021 01:48
@davidteo2d davidteo2d restored the 2d/init-pp-cam-rect branch September 23, 2021 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants