@@ -83,7 +83,6 @@ public class MCPEditorWindow : EditorWindow
8383 private bool isUnityBridgeRunning = false ;
8484 private Vector2 scrollPosition ;
8585 private string claudeConfigStatus = "Not configured" ;
86- private bool isPythonServerConnected = false ;
8786 private string pythonServerStatus = "Not Connected" ;
8887 private Color pythonServerStatusColor = Color . red ;
8988 private const int unityPort = 6400 ; // Hardcoded Unity port
@@ -137,15 +136,13 @@ private async void CheckPythonServerConnection()
137136 if ( await Task . WhenAny ( readTask , Task . Delay ( 1000 ) ) == readTask )
138137 {
139138 // Connection successful and responsive
140- isPythonServerConnected = true ;
141139 pythonServerStatus = "Connected" ;
142140 pythonServerStatusColor = Color . green ;
143141 UnityEngine . Debug . Log ( $ "Python server connected successfully on port { unityPort } ") ;
144142 }
145143 else
146144 {
147145 // No response received
148- isPythonServerConnected = false ;
149146 pythonServerStatus = "No Response" ;
150147 pythonServerStatusColor = Color . yellow ;
151148 UnityEngine . Debug . LogWarning ( $ "Python server not responding on port { unityPort } ") ;
@@ -154,7 +151,6 @@ private async void CheckPythonServerConnection()
154151 catch ( Exception e )
155152 {
156153 // Connection established but communication failed
157- isPythonServerConnected = false ;
158154 pythonServerStatus = "Communication Error" ;
159155 pythonServerStatusColor = Color . yellow ;
160156 UnityEngine . Debug . LogWarning ( $ "Error communicating with Python server: { e . Message } ") ;
@@ -163,7 +159,6 @@ private async void CheckPythonServerConnection()
163159 else
164160 {
165161 // Connection failed
166- isPythonServerConnected = false ;
167162 pythonServerStatus = "Not Connected" ;
168163 pythonServerStatusColor = Color . red ;
169164 UnityEngine . Debug . LogWarning ( $ "Python server is not running or not accessible on port { unityPort } ") ;
@@ -173,7 +168,6 @@ private async void CheckPythonServerConnection()
173168 }
174169 catch ( Exception e )
175170 {
176- isPythonServerConnected = false ;
177171 pythonServerStatus = "Connection Error" ;
178172 pythonServerStatusColor = Color . red ;
179173 UnityEngine . Debug . LogError ( $ "Error checking Python server connection: { e . Message } ") ;
0 commit comments