fixed bug

This commit is contained in:
Perfare 2020-08-06 12:56:47 +08:00
parent 0a41615763
commit 217a7993e9
2 changed files with 9 additions and 4 deletions

View File

@ -210,8 +210,13 @@ namespace AssetStudio.FbxInterop
private void ExportMesh(ImportedFrame rootFrame, List<ImportedMaterial> materialList, List<ImportedTexture> textureList, IntPtr frameNode, ImportedMesh importedMesh, bool exportSkins)
{
var boneList = importedMesh.BoneList;
var totalBoneCount = boneList.Count;
var hasBones = exportSkins && boneList != null && totalBoneCount > 0;
var totalBoneCount = 0;
var hasBones = false;
if (exportSkins && boneList?.Count > 0)
{
totalBoneCount = boneList.Count;
hasBones = true;
}
var pClusterArray = IntPtr.Zero;

View File

@ -76,7 +76,7 @@ namespace AssetStudioGUI
return 0;
}
private static int ExtractStreamFile(string extractPath,StreamFile[] fileList)
private static int ExtractStreamFile(string extractPath, StreamFile[] fileList)
{
int extractedCount = 0;
foreach (var file in fileList)
@ -328,7 +328,7 @@ namespace AssetStudioGUI
{
key = -1 - type.m_ScriptTypeIndex;
}
items.Add(key, new TypeTreeItem(key, type.m_Nodes));
items[key] = new TypeTreeItem(key, type.m_Nodes);
}
typeMap.Add(assetsFile.unityVersion, items);
}