Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

未知の material をエクスポートするとエラーになるのを回避 #1385

Merged
merged 2 commits into from Nov 25, 2021

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Nov 24, 2021

Standard でも Unlit でもない Material を含むモデルを GLTF エクスポートしようとすると・・・

error

@ousttrue
Copy link
Contributor Author

たとえば vrm を gltf としてエクスポートしようとするとヒットする・・・

@@ -43,16 +43,14 @@ public virtual IEnumerable<(string propertyName, Texture texture)> EnumerateText
// main color
yield return (MaterialExporter.COLOR_TEXTURE_PROP, m.GetTexture(MaterialExporter.COLOR_TEXTURE_PROP));

if (GetGltfMaterialTypeFromUnityShaderName(m.shader.name) == "unlit")
if (GetGltfMaterialTypeFromUnityShaderName(m.shader.name) == "Standard")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standard 互換のシェーダが Standard として認識されなくなる副作用がありそう

Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそう

@ousttrue ousttrue merged commit 076f946 into vrm-c:master Nov 25, 2021
@ousttrue ousttrue deleted the fix/gltf_export_material_validation branch January 24, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants