Describe the bug 💬
Follow-up to #668. Unity's ModelImporter replaces UV2 when "Generate Lightmap UVs" is selected in the importer, UnityGLTF currently just uses the underlying Unwrapping.GenerateSecondaryUVSet() method, which seems to simply do nothing when there's existing UVs, so we probably need to delete the existing UVs first.
Additionally, it's probably a good idea to expose the parameters that go into that method, same as the FBX importer.
Steps to reproduce 🔢
- Import file that has UV2
- Enable "Generate Lightmap UVs"
- Note no new UVs are generated, in contrast to Unity's model importer
Files to reproduce the issue ♻
See #668
Editor Version 🎲
2021.3
Render Pipeline and version
All
UnityGLTF Version
2.17.1
Operating System 👩💻
Windows, macOS, Linux
When does this problem happen?
Additional Info 📜
No response
Validations 🩹
Describe the bug 💬
Follow-up to #668. Unity's ModelImporter replaces UV2 when "Generate Lightmap UVs" is selected in the importer, UnityGLTF currently just uses the underlying
Unwrapping.GenerateSecondaryUVSet()method, which seems to simply do nothing when there's existing UVs, so we probably need to delete the existing UVs first.Additionally, it's probably a good idea to expose the parameters that go into that method, same as the FBX importer.
Steps to reproduce 🔢
Files to reproduce the issue ♻
See #668
Editor Version 🎲
2021.3
Render Pipeline and version
All
UnityGLTF Version
2.17.1
Operating System 👩💻
Windows, macOS, Linux
When does this problem happen?
Additional Info 📜
No response
Validations 🩹