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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
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)