Search Issue Tracker
Won't Fix
Votes
1
Found in [Package]
7.0.1
Issue ID
1174430
Regression
No
[HDRP] Entering Play mode in a new scene produces error with StaticLightingSky
Reproduction steps:
1) Open a new HDRP project or HDRP template
2) Open a new scene
3) Enter Play mode
Error:
Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
The following scene GameObjects were found:
StaticLightingSky
Note: If Lighting window is open, the error does not appear.
UPDATE:
The repro steps are fragile, but the bug can be still reproduced with 2019.3.0f2 with HDRP 7.1.6
Repro1:
1) Open HDRP template
2) Open new scene
3) Enter Play mode
If youre lucky will see the error
Repro 2:
1) Open HDRP template
2) Clear baked maps
3) Close Lighting window
4) Enter Play mode
5) New scene
6) Enter Playmode
Repro 3:
Keep entering playmode in new scene and template scene inbetween actions below
Bake lighing
Clear lighting
Always keep lighting window closed
Comments (4)
-
GopaGames
Apr 24, 2020 10:42
Lighting->Scene->Generate Lighting solution works on 2019.3.0f5 Thank you guys.
-
fl4ke
Feb 03, 2020 10:44
I also had this error (2019.3.0f6, HDRP 7.1.8), but it went away after regenerating the scene lighting (Lighting->Scene->Generate Lighting).
-
chmodseven
Nov 24, 2019 17:20
I managed to get past this error by going under Lighting and in the first section, setting Profile to "Sky and Fog Settings Profile" and then "HDRISky" in the dropdown below that.
After that the bug goes away, even if you move off the Lighting tab. It's still an issue though, as it should just work with the defaults without having to fill in those fields.
-
decimate_3d
Sep 11, 2019 06:16
Yeah, I'm getting the same error.
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
Finally managed to reproduce the issue with 2019.3.
The problem comes from a weird chain of event that should probably not happen. The lighting environment UI is called (even though the window is not actually visible...) after unloading the scene before entering playmode which provokes construction of a new StaticLightingObject but in what seems to be a temporary scene and thus never get cleaned up properly.
Unfortunately this happens inside the editor code and is not really controllable.
Since it does not seem to reproduce in 2020.1 and the repro is pretty specific (and will probably not happen that often in a real life situation) we consider that it's ok to not fix it.