Search Issue Tracker
Won't Fix
Votes
0
Found in
2022.3.36f1
Issue ID
UUM-74845
Regression
No
Shader error in 'Shader Graphs/Master': redefinition of '_Time' is thrown after changing the Material Dropdown
How to reproduce:
1. Create a new High Definition 3D Template Project
2. Create a new Shader Graph (Right-click in the Project Window -> Create -> Shader Graph -> HDRP -> Lit Shader Graph)
3. Open the newly created Shader Graph
4. Click the '+' on the left side of the Shader Graph window and add a float variable and call it "Time"
5. In the Graph Inspector (on the right), click "Graph Settings"
6. Change the Material Dropdown to "Lit"
7. Observe the Console
Expected result: No Errors or Warnings are being thrown
Actual Result: Shader error in 'Shader Graphs/Master': redefinition of '_Time' at /(258) (on metal) is being thrown
Reproducible with: 2022.3.36f1
Reproduced on: macOS Sonoma 14.5 (M1)
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
- Editor Perforce login fails when Perforce shows a license expiry warning
- Assertion failed error in HDRP builds when enabling STP via script
- FBX Resamples Curves incorrectly when importing FBX files
- ProBuilder GameObject Faces disappear when increasing the Sides Count value
- FileUtil.CopyFileOrDirectory throws IOException when destination parent folder does not exist
Resolution Note:
Our error messaging here could be improved, but `_Time` is used internally by Unity. Naming a material property `Time` isn't strictly illegal in the UI/UX, but it would result in a default reference name `_Time`, which is not allowed.
We plan revisiting how we handle reference name collisions in the future, but for now we recommend using more distinct reference names for material properties.