Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed virtual texture layer reference names allowing invalid characters [1304146]
- Fixed issue with SRP Batcher compatibility [1310624]
- Fixed issue with Hybrid renderer compatibility [1296776]
- Fixed an issue where the shader variant limit exceeded message was not getting passed [1304168] (https://issuetracker.unity3d.com/product/unity/issues/guid/1304168)


## [11.0.0] - 2020-10-21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class GraphObject : ScriptableObject, ISerializationCallbackReceiver
[SerializeField]
string m_AssetGuid;

internal string AssetGuid
{
get => m_AssetGuid;
}

[NonSerialized]
GraphData m_Graph;

Expand Down
11 changes: 10 additions & 1 deletion com.unity.shadergraph/Editor/Generation/Processors/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@ void BuildShader()

if (m_GraphData.GetKeywordPermutationCount() > ShaderGraphPreferences.variantLimit)
{
m_GraphData.AddValidationError(m_OutputNode.objectId, ShaderKeyword.kVariantLimitWarning, Rendering.ShaderCompilerMessageSeverity.Error);
string graphName = "";
if (m_GraphData.owner != null)
{
string path = AssetDatabase.GUIDToAssetPath(m_GraphData.owner.AssetGuid);
if (path != null)
{
graphName = Path.GetFileNameWithoutExtension(path);
}
}
Debug.LogError($"Error in Shader Graph {graphName}:{ShaderKeyword.kVariantLimitWarning}");

m_ConfiguredTextures = shaderProperties.GetConfiguredTextures();
m_Builder.AppendLines(ShaderGraphImporter.k_ErrorShader);
Expand Down