Search Issue Tracker
By Design
Votes
0
Found in [Package]
9.0.0 - preview.14
Issue ID
1252458
Regression
No
[URP] Material.FindPass() called from OnEnabled does not return correct information about the shader when entering Play Mode
How to reproduce:
1. Open user-submitted project (FindPass.zip)
2. Open the SampleScene
3. Enter Play Mode and check the Console window
Expected result: the Console outputs '1 5'
Actual result: the Console outputs '-1 1', if the TestFindPassOnLoad Component is disabled and then reenabled, it prints '1 5' correctly
Reproducible with: 2018.4.24f1, 2019.4.0f1, 2020.1.0b12, 2020.2.0a13
Reproducible with package versions: 6.9.0, 9.0.0 - preview.14
Notes:
Tested with URP Lit and Unlit Shaders
Does not reproduce with HDRP or the default Render Pipeline
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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
Resolution Note:
At the time of query no render pipeline is active, so it's checking the passes of the fallback shader (Hidden/Universal Render Pipeline/FallbackError), which has a single pass without a name.
https://docs.unity3d.com/ScriptReference/Shader-globalRenderPipeline.html can be used to check if URP is active.