Search Issue Tracker

Fixed in 2019.2.X

Fixed in 2017.4.X

Votes

0

Found in

2017.4.0f1

2018.3.4f1

Issue ID

1131979

Regression

No

Generating UV2 with UnityEditor.Unwrapping.GenerateSecondaryUVS fails when generating for models with more than 64k vertices

Progressive Lightmapper

-

To reproduce:
1. Open user's attached project ("badUV2Generation")
2. Select "GenerateUV2Test" instance in the Hierarchy window
3. In the Inspector window, right click on the script Component and select "TestGenerateUV2"
-- Error is thrown

Expected: Error is not thrown, UV2 is generated
Actual: Error is thrown, UV2 is not generated

Reproduced with: 2017.4.23f1 LTS
Not reproduced with: 2018.3.8f1, 2019.1.0b6, 2019.2.0a8

Notes:
- UV2 can be generated using Asset Importer in the inspector window (Model > Generate Lightmap UVs)

Error in the Console:
SetPerIndexUVs failed because the output has >64K vertices
UnityEditor.Unwrapping:GenerateSecondaryUVSet(Mesh)
TestGenerateUV2:TestGenerate() (at Assets/TestGenerateUV2.cs:12)

Fixed in:
2017.4.27f1

Comments (1)

  1. ohbado

    Aug 06, 2020 06:44

    The same issue is recurring in Unity 2019.4.6f1.
    When using GenerateSecondaryUVSet for a mesh with 64k or more vertices, you will get the following error message

    SetPerIndexUVs failed because the output has too many vertices
    UnityEditor.Unwrapping:GenerateSecondaryUVSet(Mesh)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.