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
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
This is a duplicate of issue #UUM-34887