This commit is contained in:
ousttrue 2021-06-02 13:53:54 +09:00
parent 178835a02d
commit a5cbb05046
6 changed files with 12 additions and 13 deletions

View File

@ -5,7 +5,7 @@ using UnityEngine;
namespace UniGLTF
{
public static class MeshExporterDivided
public static class MeshExporter_DividedVertexBuffer
{
public static (glTFMesh, Dictionary<int, int>) Export(glTF gltf, int bufferIndex,
MeshWithRenderer unityMesh, List<Material> unityMaterials,

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 92bc82be5ead84a429346379590f6d7d
guid: c21bb25d00e03bc49be4ed15201fb705
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -6,7 +6,7 @@ using UnityEngine;
namespace UniGLTF
{
public static class MeshExporter
public static class MeshExporter_SharedVertexBuffer
{
/// <summary>
/// primitive 間で vertex を共有する形で Export する。
@ -23,7 +23,7 @@ namespace UniGLTF
/// <param name="axisInverter"></param>
/// <param name="settings"></param>
/// <returns></returns>
public static (glTFMesh, Dictionary<int, int> blendShapeIndexMap) ExportSharedVertexBuffer(glTF gltf, int bufferIndex,
public static (glTFMesh, Dictionary<int, int> blendShapeIndexMap) Export(glTF gltf, int bufferIndex,
MeshWithRenderer unityMesh, List<Material> unityMaterials,
IAxisInverter axisInverter, MeshExportSettings settings)
{

View File

@ -1,8 +1,7 @@
fileFormatVersion: 2
guid: 9b5d31a97e5221e43b16cfb4213a4a79
timeCreated: 1545139997
licenseType: Free
guid: d8bea9b98938e8c489ebad8641a76900
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0

View File

@ -253,8 +253,8 @@ namespace UniGLTF
foreach (var unityMesh in uniqueUnityMeshes)
{
var (gltfMesh, blendShapeIndexMap) = meshExportSettings.DivideVertexBuffer
? MeshExporterDivided.Export(glTF, bufferIndex, unityMesh, Materials, m_axisInverter, meshExportSettings)
: MeshExporter.ExportSharedVertexBuffer(glTF, bufferIndex, unityMesh, Materials, m_axisInverter, meshExportSettings)
? MeshExporter_DividedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials, m_axisInverter, meshExportSettings)
: MeshExporter_SharedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials, m_axisInverter, meshExportSettings)
;
glTF.meshes.Add(gltfMesh);
Meshes.Add(unityMesh.Mesh);

View File

@ -136,8 +136,8 @@ namespace UniGLTF
var unityMesh = new MeshWithRenderer(go.transform);
var (gltfMesh, blendShapeIndexMap) = meshExportSettings.DivideVertexBuffer
? MeshExporterDivided.Export(glTF, bufferIndex, unityMesh, Materials, axisInverter, meshExportSettings)
: MeshExporter.ExportSharedVertexBuffer(glTF, bufferIndex, unityMesh, Materials,axisInverter, meshExportSettings)
? MeshExporter_DividedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials, axisInverter, meshExportSettings)
: MeshExporter_SharedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials,axisInverter, meshExportSettings)
;
{
@ -184,8 +184,8 @@ namespace UniGLTF
var unityMesh = new MeshWithRenderer(go.transform);
var (gltfMesh, blendShapeIndexMap) = meshExportSettings.DivideVertexBuffer
? MeshExporterDivided.Export(glTF, bufferIndex, unityMesh, Materials, axisInverter, meshExportSettings)
: MeshExporter.ExportSharedVertexBuffer(glTF, bufferIndex, unityMesh, Materials,axisInverter, meshExportSettings)
? MeshExporter_DividedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials, axisInverter, meshExportSettings)
: MeshExporter_SharedVertexBuffer.Export(glTF, bufferIndex, unityMesh, Materials,axisInverter, meshExportSettings)
;
{