diff --git a/com.unity.shadergraph/CHANGELOG.md b/com.unity.shadergraph/CHANGELOG.md index 521358424ba..c8ebdd59f32 100644 --- a/com.unity.shadergraph/CHANGELOG.md +++ b/com.unity.shadergraph/CHANGELOG.md @@ -91,6 +91,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed a compilation error when using Hybrid Renderer due to incorrect positioning of macros. - Fixed a bug where the `Create Node Menu` lagged on load. Entries are now only generated when property, keyword, or subgraph changes are detected. [1209567](https://issuetracker.unity3d.com/issues/shadergraph-opening-node-search-window-is-unnecessarily-slow). - Fixed a bug with the `Transform` node where converting from `Absolute World` space in a sub graph causes invalid subscript errors. [1190813](https://issuetracker.unity3d.com/issues/shadergraph-invalid-subscript-errors-are-thrown-when-connecting-a-subgraph-with-transform-node-with-unlit-master-node) +- Fixed a bug where adding a " to a property display name would cause shader compilation errors and show all nodes as broken - Fixed a bug where the `Position` node would change coordinate spaces from `World` to `Absolute World` when shaders recompile. [1184617](https://issuetracker.unity3d.com/product/unity/issues/guid/1184617/) - Fixed a bug where instanced shaders wouldn't compile on PS4. - Optimized loading a large Shader Graph. [1209047](https://issuetracker.unity3d.com/issues/shader-graph-unresponsive-editor-when-using-large-graphs) diff --git a/com.unity.shadergraph/Documentation~/Blackboard.md b/com.unity.shadergraph/Documentation~/Blackboard.md index 4441b57256f..98d67691cb1 100644 --- a/com.unity.shadergraph/Documentation~/Blackboard.md +++ b/com.unity.shadergraph/Documentation~/Blackboard.md @@ -11,6 +11,6 @@ You can move the Blackboard anywhere in the [Shader Graph Window](Shader-Graph-W To create a new Property or Keyword, click the **Add (+)** button on the Blackboard's title bar, and select a Property or Keyword type. -To reorder items listed on the Blackboard, drag and drop them. To delete items, use the Delete key on Windows, or the Command + Backspace key combination on OS X. To rename an item, double-click on its name, and enter a new name. Drag Properties and Keywords from the Blackboard to the graph to create a corresponding node. +To reorder items listed on the Blackboard, drag and drop them. To delete items, use the Delete key on Windows, or the Command + Backspace key combination on OS X. To rename an item, double-click on its name, and enter a new name (note: quotation marks in display names will get stripped and replaced with underscores). Drag Properties and Keywords from the Blackboard to the graph to create a corresponding node. -For a full list of Property types, see [Property Types](Property-Types). \ No newline at end of file +For a full list of Property types, see [Property Types](Property-Types). diff --git a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs index 3c6dc32af58..24b2cd16a6c 100644 --- a/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs +++ b/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs @@ -249,6 +249,8 @@ static void Visit(List outputList, Dictionary internal static string SanitizeName(IEnumerable existingNames, string duplicateFormat, string name) { + //.shader files are not cool with " in the middle of a property name (eg. Vector1_81B203C2("fo"o"o", Float) = 0) + name = name.Replace("\"", "_"); if (!existingNames.Contains(name)) return name;