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
        }
Exemplo n.º 2
0
        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)
        {
            int shaderErrorCount = ShaderUtilEx.GetShaderErrorCount(s);

            if (shaderErrorCount < 1)
            {
                return;
            }
#if UNITY_2019_3_OR_NEWER
            ShaderInspectorEx.ShaderErrorListUI(s, ShaderUtil.GetShaderMessages(s), ref this.m_ScrollPosition);
#else
            CustomShaderInspector.ShaderErrorListUI(s, ShaderUtilEx.GetShaderErrors(s), ref this.m_ScrollPosition);
#endif
        }
Exemplo n.º 4
0
 private void ShowShaderErrors(Shader s)
 {
     ShaderMessage[] messages = ShaderUtil.GetShaderMessages(s);
     if (messages.Length > 0)
     {
         this.m_ScrollPosition = GUILayout.BeginScrollView(this.m_ScrollPosition, false, false);
         foreach (ShaderMessage msg in messages)
         {
             using (new GUILayout.VerticalScope(EditorStyles.helpBox)) {
                 Texture2D icon = msg.severity == Rendering.ShaderCompilerMessageSeverity.Error ? SF_Styles.IconErrorSmall : SF_Styles.IconWarningSmall;
                 GUILayout.Label(new GUIContent($"{msg.message} at line {msg.line} on {msg.platform}", icon));
             }
         }
         GUILayout.EndScrollView();
     }
 }
Exemplo n.º 5
0
        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);
        }