ensure scaled auto uvs stay static when vertex positions are moved#335
Merged
ensure scaled auto uvs stay static when vertex positions are moved#335
Conversation
Collaborator
added 6 commits
August 24, 2020 09:51
lopezt-unity
approved these changes
Aug 31, 2020
| internal static void Unwrap(ProBuilderMesh mesh, Face face, Vector3 projection = default) | ||
| { | ||
| Projection.PlanarProject(mesh, face, projection != Vector3.zero? projection : Vector3.zero); | ||
| Projection.PlanarProject(mesh, face, projection != Vector3.zero ? projection : Vector3.zero); |
Collaborator
There was a problem hiding this comment.
Is there a special reason to check (projection != 0 ? projection : 0) ?
Contributor
Author
There was a problem hiding this comment.
Yeah, that's looks suspicious. I don't know why that is there, I will investigate
JoelFortin
approved these changes
Sep 17, 2020
Contributor
JoelFortin
left a comment
There was a problem hiding this comment.
Did a quick pass on my side. LGTM.
Had already did a pass while peer reviewing with Karl.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Purpose of this PR
Scaled auto UVs now stay static when moving adjacent faces. A new mesh format version is added for the purpose of updating legacy auto uvs to account for this change.
Links
https://forum.unity.com/threads/probuilder-bug-textures-dont-align-properly.955797/
https://forum.unity.com/threads/texture-alignment-bug.713618/