Search Issue Tracker
By Design
Votes
0
Found in [Package]
Master (e40b57c606)
Issue ID
1243011
Regression
Yes
[Shadergraph] "#if SHADERGRAPH_PREVIEW" in a custom function node throws error
Repro steps:
1. use project with Universal RP
2. Make a PBR shadergraph
3. Create a custom function node
4. Add an output, name it "Out"
5. Change the function type to "String" and name it "func"
6. Use the following code:
#if SHADERGRAPH_PREVIEW
Out = 1;
#else
Out = 0;
#endif
7. Plug the function node into Albedo
Expected result: the node preview is white
Actual result: the node preview and any downstream node previews error. The master preview works. The material works properly.
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
- No data received in Profiler when connecting to WebGL Player without "Autoconnect Profiler" option enabled
- Screen Space Ambient Occlusion is ignored when toggling "Post Processing" visibility in the Scene window overlay
- “RenderTexture.Create failed: requested size is too large.” errors are thrown and the Inspector window is black when selecting a CubemapArray texture
- Crash on AMDUnityPlugin.DLL in specific built project when using FSR2 upscaler
- RenderObjects does not have any Depth texture bound when Event is set to AfterRenderingPostProcessing
Resolution Note:
The definition was changed to use "#ifdef" instead to match other keywords used by each Render Pipeline. This will be noted in the upgrade document when the next version is verified released.