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

20 行
526 B

using UnityEngine;
#if UNITY_EDITOR
using System.Reflection;
using UnityEditor;
#endif
using UnityEditor.Graphing;
namespace UnityEditor.ShaderGraph
{
public class MaterialGraphAsset
{
public static bool ShaderHasError(Shader shader)
{
var hasErrorsCall = typeof(ShaderUtil).GetMethod("GetShaderErrorCount", BindingFlags.Static | BindingFlags.NonPublic);
var result = hasErrorsCall.Invoke(null, new object[] { shader });
return (int)result != 0;
}
}
}