Skip to content

Commit

Permalink
Merge pull request #2500 from ousttrue/fix/test_NoTexture
Browse files Browse the repository at this point in the history
[test] unittest 修正
  • Loading branch information
ousttrue authored Nov 12, 2024
2 parents 791a802 + a493661 commit 4afba0e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Assets/VRM10/Tests/LoadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,14 @@ public void NoTexture()

// 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();
Expand Down

0 comments on commit 4afba0e

Please sign in to comment.