Search Issue Tracker
Fixed in 2.1.7
Votes
3
Found in [Package]
2.1.0
Issue ID
1148230
Regression
Yes
"Invalid pass number (1) for Graphics.Blit (Material "(Unknown material)" with 1 passes)" when reloading scene from asset bundle
Reproduction steps:
1. Build bundles for the editor (WindowsStandalone or MacStandalone)
2. Install Post Processing stack 2.0.17-preview
3. Open Scene "Assets/Scenes/Bootstrap.unity" and enter Play Mode
4. Click the "Reload Scene" button
5. Observe scene reloads and no errors occur
6. Stop Play Mode
7. Install Post Processing stack 2.1.0
8. Open Scene "Assets/Scenes/Bootstrap.unity" and enter Play Mode
9. Click the "Reload Scene" button
10. Notice Error: "Invalid pass number (1) for Graphics.Blit (Material "(Unknown material)" with 1 passes)"
Actual behavior:
- Post-processing breaks (Scene turns black).
- "Invalid pass number (1) for Graphics.Blit (Material "(Unknown material)" with 1 passes)" error is shown in the Console.
Reproduced with:
2019.2.0a10
2019.1.0f2
2018.3.14f1
2018.3.0b10
Not reproducible with:
2018.3.0b9
2018.2.21f1
Regression introduced in:
2018.3.0b10
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
- Shadows are not cast when the Light's CullingMask and the GameObject's Layer do not match
- Graphics.DrawMeshInstanced does not work when 2D Renderer and 2D Shaders are used
- SpeedTree does not move when using WindZone
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
julian_cruz
May 09, 2019 16:16
Just in case you are running into this problem, there is a workaround that a user posted in the following link.
https://github.com/Unity-Technologies/PostProcessing/issues/793
Which basically is, by adding the following function to RuntimeUtilities.cs in post-processing stack package.
public static void ResetResources()
{
s_CopyStdMaterial = null;
s_CopySheet = null;
s_CopyMaterial = null;
s_CopyFromTexArrayMaterial = null;
s_CopyStdFromDoubleWideMaterial = null;
s_CopySheet = null;
s_CopyFromTexArraySheet = null;
}
Then you should run this function in PostProcessLayer.cs as you can see in the following snippet code.
void SetupContext(PostProcessRenderContext context)
{
RuntimeUtilities.s_Resources = m_Resources;
RuntimeUtilities.ResetResources();
This workaround was posted by Joshua Rosen (jshmrsn github account)