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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment