File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,6 @@ public class EphysLinkService
6161
6262 private readonly HashSet < string > _runningDemoLoops = new ( ) ;
6363 private const float DEMO_SPEED = 0.5f ; // mm/s
64- #endregion
65-
66- #region Visualization Update Resources
6764
6865 // Reusable list to avoid allocations in UpdateVisualizationProbePosition
6966 private readonly List < (
@@ -641,17 +638,16 @@ private async Task UpdateVisualizationProbePosition(SceneState sceneState)
641638 _visualizationUpdateRequests . Clear ( ) ;
642639
643640 // Iterate through manipulators directly to avoid LINQ allocations
644- for ( int i = 0 ; i < sceneState . Manipulators . Count ; i ++ )
641+ foreach ( var manipulatorState in sceneState . Manipulators )
645642 {
646- var manipulatorState = sceneState . Manipulators [ i ] ;
647-
648643 // Skip if no visualization probe name
649644 if ( string . IsNullOrEmpty ( manipulatorState . VisualizationProbeName ) )
650645 continue ;
651646
652647 // Skip if the probe or manager couldn't be found.
648+ var state = manipulatorState ;
653649 var visualizationProbeManager = ProbeManager . Instances . FirstOrDefault ( manager =>
654- manager . name == manipulatorState . VisualizationProbeName
650+ manager . name == state . VisualizationProbeName
655651 ) ;
656652 if (
657653 sceneState . Probes . FirstOrDefault ( state =>
You can’t perform that action at this time.
0 commit comments