We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0744822 commit 9ec2fe2Copy full SHA for 9ec2fe2
com.unity.ml-agents/Runtime/Academy.cs
@@ -366,8 +366,6 @@ void InitializeEnvironment()
366
port = port
367
}
368
);
369
- Communicator.QuitCommandReceived += OnQuitCommandReceived;
370
- Communicator.ResetCommandReceived += OnResetCommand;
371
372
373
if (Communicator != null)
@@ -400,6 +398,11 @@ void InitializeEnvironment()
400
398
Communicator = null;
401
399
402
+ if (Communicator != null)
+ {
403
+ Communicator.QuitCommandReceived += OnQuitCommandReceived;
404
+ Communicator.ResetCommandReceived += OnResetCommand;
405
+ }
406
407
// If a communicator is enabled/provided, then we assume we are in
408
// training mode. In the absence of a communicator, we assume we are
0 commit comments