Search Issue Tracker
By Design
Votes
0
Found in [Package]
Issue ID
1204396
Regression
No
[ShaderGraph] Can enter float into exposed integer property
When you expose a property that is in Integer mode in the shader editor, a material using these properties will still allow a float input into this field in inspector.
In the shader editor itself, a float will not be accepted into the Default field which is expected.
1. Create a new project.
2. Install the Shader Graph package. (Window -> Shader Graph)
3. Create a new graph. (i.e. Assets -> Create -> Shader -> Unlit Graph)
4. Open the new graph in the shader editor.
5. Add a new Vector1 property in the Blackboard.
6. Check 'Exposed' and set the Mode to 'Integer'.
7. Try entering 1.23 into the Default field. The field will not allow you to add the decimal place and display 123.
8. Click 'Save Asset'.
9. In the Project folder, right-click your shader graph. Create -> Material.
10. View this material in the Inspector.
11. In the exposed Vector1 field of this material, try to type in 1.23
Expected Outcome: The field should not accept the decimal value, like the behaviour inside the shader editor.
Actual Outcome: The field accepts the decimal value with no complaint.
Reproducible in package version 7.1.6, 7.1.1, 2.0.6, 1.1.9
Errors for earlier package versions, assuming that this is not a regression.
Note:
- Tested on Windows.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
- Icon section shows incomplete message and unusable check box in Build Profiles and Player Settings window instead of “Not applicable for this platform” for Dedicated Server Platform
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
Resolution Note:
So this is outside of the area of Shader Graph, as this will reproduce if you do this with a "hand written" (non Shader Graph shader), that is if you use 'name ("display name", Int) = 0' on such a shader that shader's material will also have this problem.
As such you are welcome to reopen it and assign it to a different area, but it's not on our side.
Also, we will include this as a feature request (as opposed to a bug) in the future of ShaderGraph's custom material inspector.