File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Packages/com.unity.render-pipelines.universal/Editor/2D/LightBatchingDebugger Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -457,18 +457,17 @@ private void Update()
457
457
458
458
private bool IsDirty ( )
459
459
{
460
+ if ( lightCullResult == null )
461
+ return false ;
462
+
460
463
bool isDirty = false ;
461
464
462
465
// Refresh if layers are added or removed
463
466
isDirty |= Light2DManager . GetCachedSortingLayer ( ) . Count ( ) != batchList . Sum ( x => x . LayerNames . Count ( ) ) ;
464
467
isDirty |= cachedSceneHandle != SceneManager . GetActiveScene ( ) . handle ;
465
468
isDirty |= cachedCamPos != Camera . main ? . transform . position ;
466
-
467
- if ( lightCullResult != null )
468
- {
469
- isDirty |= totalLightCount != lightCullResult . visibleLights . Count ( ) ;
470
- isDirty |= totalShadowCount != lightCullResult . visibleShadows . Count ( ) ;
471
- }
469
+ isDirty |= totalLightCount != lightCullResult . visibleLights . Count ( ) ;
470
+ isDirty |= totalShadowCount != lightCullResult . visibleShadows . Count ( ) ;
472
471
473
472
return isDirty ;
474
473
}
You can’t perform that action at this time.
0 commit comments