Search Issue Tracker




Found in






Issue ID




Lights are generated indefinitely when a GameObject has a material with a shader that uses scrolling UVs



How to reproduce:
1. Open the attached project ““
2. Open Scene “BakeScene“
3. Enable the “ScrollingCube“ GameObject in the Hierarchy
4. Press “Generate Lighting” in the Lighting window (Window>Rendering>Lighting)

Expected result: Lighting is generated
Actual result: Lighting generates indefinitely

Reproducible with: 2020.3.47f1, 2021.3.22f1, 2021.3.23f1, 2022.2.12f1, 2023.2a013
Not reproducible with: 2020.3.46f1, 2021.3.21f1, 2022.2.11f1, 2023.?

Reproduced on: macOS 13.0.1 (Intel), Windows 11 (by reporter)

*Note:* When reproducing on 2023.X, make sure to use Auto Generate Lighting. The bug also affects 2023.2, but only when baking with Auto Generate Lighting.

  1. Resolution Note:

    Fixes have landed in 2022.2.22f1 and 2021.3.27f1
    Duplicate of another internal issue: UUM-34425: Auto bakes restart when moving camera in debug visualization mode

Comments (5)

  1. giorgos_unity

    Jul 04, 2023 08:59

    This issue should be fixed in latest 2022.3 and 2021.3

  2. Pezito7

    Jul 03, 2023 08:49

    ... 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.

  3. Pezito7

    Jun 30, 2023 15:08

    Here is a quick fix for this bug: 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.

  4. unity_DF891C242F7F8235C2C2

    Jun 06, 2023 19:33

    This issue persists in 2022.3.0, adding a time node on an offset or a parallax occusion mapping node leads to infinite preparing to bake loop

  5. JasonFPL

    May 31, 2023 23:18

    This issue is NOT a duplicate of UUM-34425 and is still happening.
    2022.2.22f1 does not exist and the problem is still happening on 2022.3.0

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.