Skip to content
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

Make MeshUtils.GetUsedUVComponents configurable #22

Closed
hybridherbst opened this issue Oct 11, 2019 · 2 comments · Fixed by #47
Closed

Make MeshUtils.GetUsedUVComponents configurable #22

hybridherbst opened this issue Oct 11, 2019 · 2 comments · Fixed by #47
Assignees
Labels
enhancement New feature or request

Comments

@hybridherbst
Copy link
Contributor

hybridherbst commented Oct 11, 2019

Currently, UV layout is attempted to be auto-detected. This resulted in a really hard to find bug for me: I am using uv0.xyzw with z and w being data channels. On some meshes, those data channels are both 0, but the meshes still need to use 4-channel UVs so all shaders properly work (zw are undefined / sometimes 1 after only setting UV2 channels on new mesh generation).

It would be great if this default behaviour could be overriden to prevent such failures. I understand that this is a rare edge case.

@Whinarn
Copy link
Owner

Whinarn commented Dec 7, 2019

I understand. The real problem here is that Unity does not (as far as I know, it could have changed in later APIs) expose any way to get the number of UV components of meshes. So the only way for me to find out without the number being explicit for every simplification was to use this automatic detection. I think it should work in most cases, but in cases such as your it wouldn't.

But you are right that there should be an option to override this behavior.

@Whinarn Whinarn self-assigned this Dec 7, 2019
@Whinarn Whinarn added the enhancement New feature or request label Dec 7, 2019
@Whinarn
Copy link
Owner

Whinarn commented Mar 26, 2021

This should now be resolved with #47.

@Whinarn Whinarn closed this as completed Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants