mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-22 02:00:59 -05:00
Unlit/Color だと
var index = textureExporter.RegisterExportingAsSRgb(src.mainTexture, false); // GetTexture("_MainTex");
が例外を発生させる。
This commit is contained in:
parent
791a80225f
commit
a4936617f6
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user