Search Issue Tracker
Fixed in 2020.1.X
Votes
0
Found in
Issue ID
1092442
Regression
Yes
Setting custom bake inputs from the Lightmapping.started callback throws an error on the first bake
Setting custom bake inputs has this check
```if (!GetProgressiveBakingBackendEnabled())
ErrorString("Custom bake inputs will not be processed. Please make sure to enable Baked Global Illumination and select Progressive as the Lightmapper before generating lighting.")```
and that spits out this error if the custom bake inputs are set in the `Lightmapping.started` callback on the first bake after the Editor has been started.
The problem is that when you start the Editor the backend is invalid until the Progressive Lightmapper clears itself (which takes a few Update ticks).
It looks to me that this check should look at `GetLightmapEditorSettings().GetBakeBackend()` (what the user has set) to do the validation and not at `GISceneManager::Get()->GetBakeBackend()` (which will be invalid for the first few ticks and generally is a bit weird, as the pipeline clearing itself could query the backend and is not really expecting to get invalid as a result).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash when attempting to create a custom FMOD DSP unit
- [Linux] Floating windows do not keep their size after restarting the Editor
- .framework plugin is mistakenly treated as a directory when building for Universal Windows Platform
- Artifacts appear on GameObjects when using the WebGL Player on Silicon macOS
- Only the icon of the disabled child GameObject is faded when a parent GameObject is a Prefab
Add comment