File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010- Support for the PlayStation 5 platform has been added.
1111- Support for the XboxSeries platform has been added.
1212
13+ ### Fixed
14+ - Fix for issue thrown upon unloading a scene from an AssetBundle (case 1262826)
15+
1316## [ 3.0.3] - 2021-02-19
1417
1518- bump version to 3.0.3 to not conflict with unrelease 3.0.2
Original file line number Diff line number Diff line change @@ -856,7 +856,10 @@ void SetupContext(PostProcessRenderContext context)
856856 {
857857 // Juggling required when a scene with post processing is loaded from an asset bundle
858858 // See #1148230
859- if ( m_OldResources != m_Resources )
859+ // Additional !RuntimeUtilities.isValidResources() to fix #1262826
860+ // The static member s_Resources is unset by addressable. The code is ill formed as it
861+ // is not made to handle multiple scene.
862+ if ( m_OldResources != m_Resources || ! RuntimeUtilities . isValidResources ( ) )
860863 {
861864 RuntimeUtilities . UpdateResources ( m_Resources ) ;
862865 m_OldResources = m_Resources ;
Original file line number Diff line number Diff line change @@ -381,6 +381,11 @@ public static PropertySheet copyFromTexArraySheet
381381 }
382382 }
383383
384+ internal static bool isValidResources ( )
385+ {
386+ return s_Resources != null ;
387+ }
388+
384389 internal static void UpdateResources ( PostProcessResources resources )
385390 {
386391 Destroy ( s_CopyMaterial ) ;
You can’t perform that action at this time.
0 commit comments