Merge pull request #2500 from ousttrue/fix/test_NoTexture

[test] unittest 修正
This commit is contained in:
ousttrue 2024-11-12 18:05:28 +09:00 committed by GitHub
commit 4afba0ec53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,10 +89,14 @@ namespace UniVRM10.Test
// remove textures
instance.Vrm.Meta.Thumbnail = null;
var m = new Material(Shader.Find("Unlit/Color"));
foreach (var r in instance.GetComponentsInChildren<Renderer>())
{
r.sharedMaterials = r.sharedMaterials.Select(x => m).ToArray();
r.sharedMaterials = r.sharedMaterials.Select(x =>
{
var m = new Material(Shader.Find("UniGLTF/UniUnlit"));
return m;
}).ToArray();
}
var settings = new GltfExportSettings();