-
Notifications
You must be signed in to change notification settings - Fork 855
Fixed how errors were displayed when variant limits were reached. Fix… #5829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. Shader Graph Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
m_ConfiguredTextures = shaderProperties.GetConfiguredTextures(); | ||
m_Builder.AppendLines(ShaderGraphImporter.k_ErrorShader.Replace("Hidden/GraphErrorShader2", graphName)); | ||
// Don't continue building the shader, we've already built an error shader. | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prevents the duplicate shader from being put in the same file.
com.unity.shadergraph/Editor/Importers/ShaderSubGraphImporter.cs
Outdated
Show resolved
Hide resolved
com.unity.shadergraph/Editor/Drawing/Blackboard/SGBlackboard.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good! approving 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this out locally and it's working well. Very clear message now.
#5829) * Fixed how errors were displayed when variant limits were reached. Fixes fogbugz 1355815 # Conflicts: # com.unity.shadergraph/CHANGELOG.md
…es fogbugz 1355815
Please read the Contributing guide before making a PR.
Checklist for PR maker
CHANGELOG.md
file.Purpose of this PR
https://fogbugz.unity3d.com/f/cases/1355815/
The behavior of this bug has shifted over the past few months. The last main fix that caused the latest behavior was #3664. This removed a validation error being added to each preview node which is how the old error message used to be displayed. This caused each node to now fall back to the shader compiler error. This shader compiler error was because we put both the error shader and the original shader in the same preview, something akin to:
Removing the duplicate shaders removed the unreadable error, but left the user with only a log message and the pink preview shaders.

To aid discoverability, a help box was added to the blackboard when the variant limit was reached.

Testing status
Comments to reviewers
Notes for the reviewers you have assigned.