Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Editor/GroupedShellTransfer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ public static SourceShellInfo[] AnalyzeSource(Mesh sourceMesh)
var uv2List = new List<Vector2>();
sourceMesh.GetUVs(0, uv0List);
sourceMesh.GetUVs(1, uv2List);
if (uv0List.Count == 0 || uv2List.Count == 0)
if (uv0List.Count != sourceMesh.vertexCount ||
uv2List.Count != sourceMesh.vertexCount)
{
UvtLog.Error("[GroupedTransfer] Source mesh missing UV0 or UV2");
UvtLog.Error("[GroupedTransfer] Source mesh has missing or incomplete UV0/UV2");
return null;
}
var uv0 = uv0List.ToArray();
Expand Down Expand Up @@ -870,8 +871,8 @@ static TransferResult TransferCore(
$"oobMargin={uv2OobMargin:F6}, boundsTol={uv2BoundsTolerance:F6}");
}

if (srcUv0.Length == 0 || srcUv2.Length == 0)
{ UvtLog.Error("[GroupedTransfer] Source missing UV0/UV2"); return result; }
if (srcUv0.Length != srcVerts.Length || srcUv2.Length != srcVerts.Length)
{ UvtLog.Error("[GroupedTransfer] Source has missing or incomplete UV0/UV2"); return result; }

UvProgress.ReportFromBackground($"'{targetMeshName}' ← '{sourceMeshName}'");

Expand Down
Loading