private void ShowShaderErrors(Shader s) { #if UNITY_2019_3_OR_NEWER if (Event.current.type == EventType.Layout) { int n = ShaderUtil.GetShaderMessageCount(s); m_ShaderMessages = null; if (n >= 1) { m_ShaderMessages = ShaderUtil.GetShaderMessages(s); } } if (m_ShaderMessages == null) { return; } ShaderInspectorEx.ShaderErrorListUI(s, m_ShaderMessages, ref this.m_ScrollPosition); #else int shaderErrorCount = ShaderUtilEx.GetShaderErrorCount(s); if (shaderErrorCount < 1) { return; } CustomShaderInspector.ShaderErrorListUI(s, ShaderUtilEx.GetShaderErrors(s), ref this.m_ScrollPosition); #endif }
public static int GetShaderErrorCount(Shader s) { #if UNITY_2019_3_OR_NEWER return(ShaderUtil.GetShaderMessageCount(s)); #else return(( int )ShaderUtilEx.Type.InvokeMember("GetShaderErrorCount", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, new object[] { s })); #endif }
private void ShowShaderErrors(Shader s) { int n = ShaderUtil.GetShaderMessageCount(s); if (n < 1) { return; } ShaderErrorListUI(s, ShaderUtil.GetShaderMessages(s), ref m_ScrollPosition); }
private void ShowShaderErrors(Shader s) { if (Event.current.type == EventType.Layout) { int n = ShaderUtil.GetShaderMessageCount(s); m_ShaderMessages = null; if (n >= 1) { m_ShaderMessages = ShaderUtil.GetShaderMessages(s); } } if (m_ShaderMessages == null) { return; } ShaderErrorListUI(s, m_ShaderMessages, ref m_ScrollPosition); }