Finally taking a look at the API
I copy-pasted the example code and had to add bool bakeProbeOcclusion
to Initialize as well as to define the occlusion
property for it to compile. I’m glad the occlusion probe values are now writable!
LightingBaker/SkyOcclusionBaker APIs are nice, I had no problem with these. I managed to compute my own SHs/light occlusion/sky occlusion.
However, things get weirder when trying to configure bake settings. How do you set a baking set? How do you add scenes to a baking set? I managed to do it via reflection, but it could be better.
Baking Sets in general seem like a needless complication. And I gave up tweaking the scene list, because, for reasons unknown, I often get “Assertion failed” from BakeAsync after touching it. Even worse, there’s no stack trace to explain where it failed, and BakeAsync returns true. After it fails, it also breaks URP completely, and I have to reload domain to fix it…
BakingSet also takes scene GUIDs when adding/removing, but there’s no public guid API to get it in the same format (only internal property).
TryAddScene API is also confusing… why try? Why does it fail? What should I call to actually add it?
I also got “Trying to load Adaptive Probe Volumes data bakedwith an older incompatible version of APV. Please rebake your data.” once after creating my BakingSet from code…
Baking Sets being separate assets, yet having to reference mutually exclusive scenes generally seems to lead to many bugs if there’s a collision. I’ve found everything to work much smoother if I just delete all Baking Set assets in my project and keep one…
Now I see that apparently TryAddScene fails if this scene is already added to another asset… so to bake a scene, I have to modify existing assets in the project that I possibly didn’t create. This design decision is very questionable…
I also get a NullRef randomly from RemovePendingScene() when trying to set a Baking Set.
it would be much nicer if one could just supply a list of scenes and a settings structure to BakeAsync.