From f077064a6afdbef186f332a665ea42eb3c40d1aa Mon Sep 17 00:00:00 2001 From: VaDiM Date: Sun, 6 Apr 2025 00:06:09 +0300 Subject: [PATCH] Fix for UV bindings --- AssetStudioFBXWrapper/FbxExporterContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AssetStudioFBXWrapper/FbxExporterContext.cs b/AssetStudioFBXWrapper/FbxExporterContext.cs index 9a50211..8040d0c 100644 --- a/AssetStudioFBXWrapper/FbxExporterContext.cs +++ b/AssetStudioFBXWrapper/FbxExporterContext.cs @@ -264,7 +264,7 @@ namespace AssetStudio.FbxInterop } else if(fbxSettings.UvBindings[i] > 0) //if checked { - AsFbxMeshCreateUVMap(mesh, i, fbxSettings.UvBindings[i]); + AsFbxMeshCreateUVMap(mesh, i, fbxSettings.UvBindings[i] - 1); } } @@ -370,7 +370,7 @@ namespace AssetStudio.FbxInterop for (var uvIndex = 0; uvIndex < importedMesh.hasUV.Length; uvIndex += 1) { - if (importedMesh.hasUV[uvIndex]) + if (importedMesh.hasUV[uvIndex] && fbxSettings.UvBindings[uvIndex] > 0) { var uv = importedVertex.UV[uvIndex]; AsFbxMeshElementUVAdd(mesh, uvIndex, uv[0], uv[1]);