This commit is contained in:
Masataka SUMI
2022-11-03 02:02:08 +09:00
parent 8af4eaecf5
commit 9f8459653d
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ namespace UniGLTF
srcMaterial.mainTextureOffset = offset;
srcMaterial.mainTextureScale = scale;
var materialExporter = new MaterialExporter();
var materialExporter = new BuiltinRPGltfMaterialExporter();
var gltfMaterial = materialExporter.ExportMaterial(srcMaterial, textureExporter, new GltfExportSettings());
gltfMaterial.pbrMetallicRoughness.baseColorTexture.extensions = gltfMaterial.pbrMetallicRoughness.baseColorTexture.extensions.Deserialize();
@@ -257,7 +257,7 @@ namespace UniGLTF
var material = new Material(Shader.Find("Standard"));
material.SetColor("_EmissionColor", new Color(0, 1, 2, 1));
material.EnableKeyword("_EMISSION");
var materialExporter = new MaterialExporter();
var materialExporter = new BuiltinRPGltfMaterialExporter();
var textureExporter = new TextureExporter(new EditorTextureSerializer());
var gltfMaterial = materialExporter.ExportMaterial(material, textureExporter, new GltfExportSettings());

View File

@@ -23,7 +23,7 @@ namespace UniGLTF
var material = new Material(Shader.Find("Standard"));
material.mainTexture = tex0;
var materialExporter = new MaterialExporter();
var materialExporter = new BuiltinRPGltfMaterialExporter();
materialExporter.ExportMaterial(material, textureExporter, new GltfExportSettings());
var exported = textureExporter.Export();