I upgraded my URP project from LTS 21 to Unity 6.
But now, all skybox reflections are gone!
Most strange thing is: just after pressing “Generate Lighting” button in “Lighting” window, I see reflections. But just after generation complete, when importing begins, all reflections are gone!
Also, generated reflectionprobe texture asset has “Texture shape” set as “2D”, not "cube’ (this beheviour is diffrent from fresh new Unity 6 projects, where all generated reflection textures have “cube” texture shape!). Changing it to “cube” manualy, didn’t fix the problem though.
The only workaround I found, is to set Environment Reflections Source to “Custom”, and pick generated cubemap.
But why?!
Any ideas? Looks like I broke something when upgraded my project
this is how cube looks during lkighting generating process:
and this is how it looks moment after, when import starts
Hi
Do you maybe have any asset in your project that somehow resets the lighting, and assumes that the “Auto Generate” option that we had before is still active? We removed that checkbox, since it had caused troubles, but maybe some scripts still think it is present.
Can you reproduce that with an empty project?
Hm… I’m using dinamic skybox change sometimes like this:
RenderSettings.skybox = m_skyboxMaterial;
RenderSettings.ambientIntensity = skyboxLightIntensity;
DynamicGI.UpdateEnvironment();
(still, I don’t see any reflections). But beyonnd that, could not remember anything related.
And I’m not using this code in the scene (on the shots)
Also, I found in old .lighting asset line:
m_GIWorkflowMode: 1
I don’t see this parameter in newly created .ligting assets.
DynamicGI.UpdateEnvironment() only updates the ambient probe, used for diffuse environment lighting. It does not update the default reflection cubemap, used for specular environment lighting. If you also want to update the reflections, you can use something like the script I posted here [Solved] SceneManager.LoadScene() make the scene darker... a bug?
“Generate Lighting” button creates cubemap for reflections. And for a moment, I can see reflections in scene. But then, suddenly all reflections become dark.
Most strange thing is, generated texture has “2D” shape, not “cube”. But manual texture settings ajustment doesn’t make any difference.
I found something strange: For generated reflection texture there are two Asset PostProcessors. Maybe, the second one is the source of the issue. But I can’t figure out what it is and where to look:
I cannot reproduce problem on newly created projects. So, I guess, this has to do something with converting project from LTS 2021 to Unity 6 (long jump two major versions).
So, my final workaround is:
- Made custom package with all of projects assets
- Created new URP project from scratch
- Install all needed plug-ins and packages from Package Manager
- Made some settingvs (layers, tags, physics etc.)
- Import all assets from package
Took me some time, but now everything looks good.
So now, it’s not a pressing issue, but a curious case I (and maybe some one else) could learn from.