@@ -162,7 +162,7 @@ private void ViewBatch(int index)
162162
163163 foreach ( var obj in batch1 . Lights )
164164 {
165- if ( obj != null )
165+ if ( obj != null )
166166 lightBubble1 . Add ( MakePill ( obj ) ) ;
167167 }
168168
@@ -241,7 +241,7 @@ private void CompareBatch(int index1, int index2)
241241 lightBubble1 . Clear ( ) ;
242242 foreach ( var obj in lightSet1 )
243243 {
244- if ( obj != null )
244+ if ( obj != null )
245245 lightBubble1 . Add ( MakePill ( obj ) ) ;
246246 }
247247
@@ -255,7 +255,7 @@ private void CompareBatch(int index1, int index2)
255255 lightBubble2 . Clear ( ) ;
256256 foreach ( var obj in lightSet2 )
257257 {
258- if ( obj != null )
258+ if ( obj != null )
259259 lightBubble2 . Add ( MakePill ( obj ) ) ;
260260 }
261261
@@ -391,7 +391,7 @@ private void OnSelectionChanged()
391391 var firstIndex = batchListView . selectedIndices . First ( ) ;
392392 var secondIndex = batchListView . selectedIndices . Last ( ) ;
393393
394- if ( secondIndex > firstIndex + 1 || secondIndex < firstIndex - 1 )
394+ if ( secondIndex > firstIndex + 1 || secondIndex < firstIndex - 1 )
395395 {
396396 // Clamp since we do adjacent batch comparisons
397397 secondIndex = Mathf . Clamp ( secondIndex , firstIndex - 1 , firstIndex + 1 ) ;
@@ -408,7 +408,7 @@ private void OnSelectionChanged()
408408
409409 default :
410410 // Account for multiple select either with shift or ctrl keys
411- if ( batchListView . selectedIndices . Count ( ) > 2 )
411+ if ( batchListView . selectedIndices . Count ( ) > 2 )
412412 {
413413 if ( selectedIndices . Count == 1 )
414414 {
@@ -466,8 +466,12 @@ private bool IsDirty()
466466 isDirty |= Light2DManager . GetCachedSortingLayer ( ) . Count ( ) != batchList . Sum ( x => x . LayerNames . Count ( ) ) ;
467467 isDirty |= cachedSceneHandle != SceneManager . GetActiveScene ( ) . handle ;
468468 isDirty |= cachedCamPos != Camera . main ? . transform . position ;
469- isDirty |= totalLightCount != lightCullResult . visibleLights . Count ( ) ;
470- isDirty |= totalShadowCount != lightCullResult . visibleShadows . Count ( ) ;
469+
470+ if ( lightCullResult . IsGameView ( ) )
471+ {
472+ isDirty |= totalLightCount != lightCullResult . visibleLights . Count ( ) ;
473+ isDirty |= totalShadowCount != lightCullResult . visibleShadows . Count ( ) ;
474+ }
471475
472476 return isDirty ;
473477 }
0 commit comments