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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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)