godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.42k stars 21.06k forks source link

UV2 Does Not Update When Light Bake Setting Changed #94334

Open WickedInsignia opened 3 months ago

WickedInsignia commented 3 months ago

Tested versions

4.3 Beta 3

System information

Windows 11, Nvidia RTX4070ti, AMD Ryzen7700x

Issue description

If a mesh has a custom UV2, switching from Static to Static Lightmaps (and vice versa) for Light Baking and hitting Reimport does not update the lightmap until the scene is reloaded. The completed bake will act like the setting was never changed. If the only mesh in the scene has no UV2, switching from Static to Static Lightmaps causes Godot to warn the user that no UV2 is available for lightmapping. The scene must be reloaded to rectify.

Steps to reproduce

Minimal reproduction project (MRP)

customlightmapbugv2.zip

Calinou commented 3 months ago

This also happens with Lightmap Texel Size changes last time I checked. It's yet another issue of reimported scenes not updating in the editor (which has been reported numerous times). Some instances of this were fixed in 4.3.beta but not all.