-
Notifications
You must be signed in to change notification settings - Fork 92
[UUM-133528] Fixing autolightmap UV not rebuilding #689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2617,7 +2617,10 @@ | |
| { | ||
| pb.ToMesh(); | ||
| pb.Refresh(); | ||
| pb.Optimize(); | ||
| } | ||
| ProBuilderEditor.Refresh(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This centralized rebuild still runs for the 🤖 Helpful? 👍/👎 |
||
| SceneView.RepaintAll(); | ||
| } | ||
|
|
||
| foreach (var kvp in MeshSelection.selectedFacesInEditZone) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pb.Optimize()does not reliably restore the UV2 channel thatpb.ToMesh()just cleared.ToMesh()always setsmesh.uv2 = null, whileOptimize()only regenerates UV2 when Auto Lightmap UVs is enabled and the mesh contributes GI, or when you passtrue. That means meshes with an existing UV2 channel but noContributeGIflag (or projects with Auto Lightmap UVs turned off) will still lose UV2 after these Auto UV actions. If the goal is to preserve lightmap UVs across this path, this needsOptimize(true)or a path that avoidsToMesh()for metadata-only edits.🤖 Helpful? 👍/👎