Search Issue Tracker
Duplicate
Votes
0
Found in
2021.3.27f1
2022.3.1f1
Issue ID
UUM-40320
Regression
Yes
Lighting bake is stuck when a Shader Graph uses the Time node and Scene view is open
Reproduction steps:
1. Open the attached project
2. Open the Lighting window and make sure the Scene view is still visible
3. Click "Generate Lighting"
4. Open the Background Tasks window
Expected result: Lighting generation completes
Actual result: "Preparing Bake..." task keeps restarting
Reproducible with: 2021.3.27f1, 2022.2.12f1, 2022.3.1f1
Not reproducible with: 2022.2.11f1, 2023.1.0f1
Could not test with: 2023.2.0a19 (crash)
Reproducible on: macOS 13.2.1 (Intel), Windows 11 (user's)
-
Resolution Note:
This is already fixed in latest 2022.3 and latest 2021.3
Duplicate of https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-34887
Comments (2)
-
Pezito7
Jul 03, 2023 08:50
... Update to my previous comment: the "fix" doesn't work, my bad. What really fixes it is NO FOCUS ON SCENE. You can leave a Time node in your Shader Graph, you can use a Custom Function node like I said – what really matters is to set the UI's focus on another tab than Scene. What I do is make sure I'm in the Shader Graph tab (and the Scene tab isn't visible) when I want to bake. This, at least, works.
-
Pezito7
Jun 30, 2023 15:14
Here's a quick fix for people who cannot switch to a more recent version of Unity (I for one am stuck with 2022.3.0 for now).
In Shader Graph, do not use a Time node but instead, use a Custom Function that mimics it. The name you give to the custom function doesn't matter, it doesn't need an input value either. All you need is an output float, and the function's code be as follow (i.e. if you name the output "myOutput"):
myOutput = _Time.y;
Connect the output just like you would connect a Time node and it should let your shader work without triggering an infinite loop during bake.
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
This is a duplicate of issue #UUM-34887