Skip to content

Commit f077064

Browse files
committed
Fix for UV bindings
1 parent 190cb68 commit f077064

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AssetStudioFBXWrapper/FbxExporterContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private void ExportMesh(ImportedFrame rootFrame, List<ImportedMaterial> material
264264
}
265265
else if(fbxSettings.UvBindings[i] > 0) //if checked
266266
{
267-
AsFbxMeshCreateUVMap(mesh, i, fbxSettings.UvBindings[i]);
267+
AsFbxMeshCreateUVMap(mesh, i, fbxSettings.UvBindings[i] - 1);
268268
}
269269
}
270270

@@ -370,7 +370,7 @@ private void ExportMesh(ImportedFrame rootFrame, List<ImportedMaterial> material
370370

371371
for (var uvIndex = 0; uvIndex < importedMesh.hasUV.Length; uvIndex += 1)
372372
{
373-
if (importedMesh.hasUV[uvIndex])
373+
if (importedMesh.hasUV[uvIndex] && fbxSettings.UvBindings[uvIndex] > 0)
374374
{
375375
var uv = importedVertex.UV[uvIndex];
376376
AsFbxMeshElementUVAdd(mesh, uvIndex, uv[0], uv[1]);

0 commit comments

Comments
 (0)