Search Issue Tracker
Fixed in 10.1.0
Votes
0
Found in [Package]
9.0.0-preview.14
Issue ID
1258832
Regression
No
Shader Graph Custom Function fails to compile giving an unclear error when its name contains whitespaces
How to reproduce:
1. Create a new project
2. Import the Shader Graph package from the Package Manager
3. In the Project window create any new Shader Graph (for example, Unlit Graph)
4. Open the newly created graph
5. Create a new Custom Function Node
6. Click the cogwheel icon in the newly created Node
7. Add an input 'a' and an output 'b' of type Vector 1 to the Custom Function
8. Change the Function Type to 'String'
9. Enter a Function Name that would have a whitespace symbol (for example, 'My Function' or 'MyFunction ')
10. Enter the function body as 'b = a;'
Expected results: the whitespace gets stripped and Custom Function compiles successfully or an informative error is thrown
Actual results: the Custom Function fails to compile giving the following error: syntax error: unexpected token '_float'
Reproducible with: 7.3.1 (2019.4.2f1), 8.1.0 (2020.1.0b13, 2020.2.0a15), 9.0.0-preview.14 (2020.2.0a15)
Could not test with: 2018.4.24f1 (could not create a Custom Function Node)
Notes:
The error message is unclear because the user does not write '_float' which is added to the end of the function name
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Add comment