Search Issue Tracker

Fixed

Fixed in 6000.3.14f1, 6000.4.4f1, 6000.5.0b5, 6000.6.0a2

Votes

0

Found in

2021.3.50f1

2022.3.60f1

6000.0.44f1

6000.1.0b12

6000.2.0a7

6000.3.0a1

6000.4.0a1

6000.5.0a1

6000.6.0a2

Issue ID

UUM-101568

Regression

No

Material.FindPass returns -1 in build when shader pass is used

Materials

-

How to reproduce:
1. Open the “IN-97399_TestFindPass“ project
2. Open the SampleScene
3. In the top menu select File > Build and Run
4. Observe the Player.log “DepthNormals Pass Index” value

Expected result: DepthNormals Pass Index: 5 (Positive value)
Actual result: DepthNormals Pass Index: -1

Reproducible with: 2021.3.50f1, 2022.1.0a1, 2022.3.60f1, 6000.0.44f1, 6000.1.0b12, 6000.2.0a7

Reproducible on: macOS 15.3.2 (M1 Max), Windows 11 (by user)
Not reproducible on: no other environments tested

  1. Resolution Note:

    Hi there.

    This bug has been identified and fixed on 6.3 and above. However, if you are using an earlier version of Unity, you can work around this issue by deferring calling Material.FindPass() to after the 'activeRenderPipelineCreated' event fires, instead of doing it on Awake()/Start().

    See: https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Rendering.RenderPipelineManager-activeRenderPipelineCreated.html

  2. Resolution Note (fix version 6000.6.0a2):

    Fixed in 6000.6.0a2

  3. Resolution Note (fix version 6000.6.0a2):

    Hi there.

    This bug has been identified and fixed on 6.3 and above. However, if you are using an earlier version of Unity, you can work around this issue by deferring calling Material.FindPass() to after the 'activeRenderPipelineCreated' event fires, instead of doing it on Awake()/Start().

    See: https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Rendering.RenderPipelineManager-activeRenderPipelineCreated.html

  4. Resolution Note (fix version 6000.3.14f1):

    Fixed in 6000.3.14f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.