mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-06-03 00:58:13 -04:00
Fixed bug
This commit is contained in:
parent
35edb9d391
commit
9d1fd2f945
@ -231,7 +231,7 @@ namespace AssetStudio
|
|||||||
var subHashSet = new HashSet<int>();
|
var subHashSet = new HashSet<int>();
|
||||||
var combine = false;
|
var combine = false;
|
||||||
int firstSubMesh = 0;
|
int firstSubMesh = 0;
|
||||||
if (meshR.m_StaticBatchInfo != null && meshR.m_StaticBatchInfo.subMeshCount > 0)
|
if (meshR.m_StaticBatchInfo?.subMeshCount > 0)
|
||||||
{
|
{
|
||||||
firstSubMesh = meshR.m_StaticBatchInfo.firstSubMesh;
|
firstSubMesh = meshR.m_StaticBatchInfo.firstSubMesh;
|
||||||
var finalSubMesh = meshR.m_StaticBatchInfo.firstSubMesh + meshR.m_StaticBatchInfo.subMeshCount;
|
var finalSubMesh = meshR.m_StaticBatchInfo.firstSubMesh + meshR.m_StaticBatchInfo.subMeshCount;
|
||||||
@ -241,7 +241,7 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
combine = true;
|
combine = true;
|
||||||
}
|
}
|
||||||
else if (meshR.m_SubsetIndices != null)
|
else if (meshR.m_SubsetIndices?.Length > 0)
|
||||||
{
|
{
|
||||||
firstSubMesh = (int)meshR.m_SubsetIndices.Min(x => x);
|
firstSubMesh = (int)meshR.m_SubsetIndices.Min(x => x);
|
||||||
foreach (var index in meshR.m_SubsetIndices)
|
foreach (var index in meshR.m_SubsetIndices)
|
||||||
@ -284,7 +284,7 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
iVertex.Position = new Vector3(-mesh.m_Vertices[j * c], mesh.m_Vertices[j * c + 1], mesh.m_Vertices[j * c + 2]);
|
iVertex.Position = new Vector3(-mesh.m_Vertices[j * c], mesh.m_Vertices[j * c + 1], mesh.m_Vertices[j * c + 2]);
|
||||||
//Normals
|
//Normals
|
||||||
if (mesh.m_Normals != null && mesh.m_Normals.Length > 0)
|
if (mesh.m_Normals?.Length > 0)
|
||||||
{
|
{
|
||||||
if (mesh.m_Normals.Length == mesh.m_VertexCount * 3)
|
if (mesh.m_Normals.Length == mesh.m_VertexCount * 3)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user