您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

38 行
1.0 KiB

using System.Collections.Generic;
using UnityEngine;
namespace MetaCity.BundleKit.Editor.VRM
{
public class MetacityVRMMaterialValidator : UniGLTF.DefaultMaterialValidator
{
const string MTOON_SHADER_NAME = "VRM10/MToon10";
public override string GetGltfMaterialTypeFromUnityShaderName(string shaderName)
{
switch (shaderName)
{
case MTOON_SHADER_NAME:
return "VRMC_materials_mtoon";
}
// TODO: VRM-0.X
return base.GetGltfMaterialTypeFromUnityShaderName(shaderName);
}
public override IEnumerable<(string propertyName, Texture texture)> EnumerateTextureProperties(Material m)
{
if (m.shader.name == MTOON_SHADER_NAME)
{
// TODO
}
else
{
foreach (var x in base.EnumerateTextureProperties(m))
{
yield return x;
}
}
}
}
}