File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Assets/MRTK/Services/DiagnosticsSystem Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -449,8 +449,15 @@ private void LateUpdate()
449
449
}
450
450
451
451
// Update visibility state.
452
- window . gameObject . SetActive ( ShouldShowProfiler ) ;
453
- memoryStats . gameObject . SetActive ( memoryStatsVisible ) ;
452
+ if ( window . gameObject . activeSelf != ShouldShowProfiler )
453
+ {
454
+ window . gameObject . SetActive ( ShouldShowProfiler ) ;
455
+ }
456
+
457
+ if ( memoryStats . gameObject . activeSelf != memoryStatsVisible )
458
+ {
459
+ memoryStats . gameObject . SetActive ( memoryStatsVisible ) ;
460
+ }
454
461
}
455
462
}
456
463
@@ -648,8 +655,15 @@ private void BuildWindow()
648
655
}
649
656
}
650
657
651
- window . gameObject . SetActive ( ShouldShowProfiler ) ;
652
- memoryStats . gameObject . SetActive ( memoryStatsVisible ) ;
658
+ if ( window . gameObject . activeSelf != ShouldShowProfiler )
659
+ {
660
+ window . gameObject . SetActive ( ShouldShowProfiler ) ;
661
+ }
662
+
663
+ if ( memoryStats . gameObject . activeSelf != memoryStatsVisible )
664
+ {
665
+ memoryStats . gameObject . SetActive ( memoryStatsVisible ) ;
666
+ }
653
667
}
654
668
655
669
private void BuildFrameRateStrings ( )
You can’t perform that action at this time.
0 commit comments