guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

Bakery sectors not working as expected in Unity 2022.2.17, URP #151

Closed chotrov closed 1 year ago

chotrov commented 1 year ago

I wanted to test-out Bakery's sectors, but am having issues on latest Unity 2022 Version (URP). Clicking "Preview" creates a distorted projection that seems to change, based on my camera position in the editor window. Decided to hop onto an empty project in Unity 2020 (URP) and it seems to work fine as seen in the first image. Tested with latest github patch.

Unity 2020.3.37 Unity 2020 Unity 2022.2.17 Unity 2022

guycalledfrank commented 1 year ago

Thanks for reporting. Indeed, it doesn't even seem to be related to URP - just a general 2022 issue. It looks like Camera.current is now always null in the editor, while previously you could get it (and its matrix). I added a random workaround that seems to work, but it spams some engine errors ("Matrix stack is empty") to console: https://github.com/guycalledfrank/bakery-csharp/commit/76a16b0559fd7cc45b6c06dff442c0ba19028313

But since it works... ehh...

Can you try updating via the patcher and check it?

chotrov commented 1 year ago

Confirmed. It works now (with the "Matrix stack is empty errors). Thanks for the fast response :).