Commit 47464ae7 authored by Benjamin's avatar Benjamin
Browse files

add environment close in play mode

parent 04c7c1f5
...@@ -123,6 +123,13 @@ class AnimalAIEnvironment(UnityEnvironment): ...@@ -123,6 +123,13 @@ class AnimalAIEnvironment(UnityEnvironment):
else: else:
raise timeoutException raise timeoutException
def close(self):
if self.play:
self.communicator.close()
self.proc1.kill()
else:
super().close()
@staticmethod @staticmethod
def executable_args( def executable_args(
n_arenas: int = 1, n_arenas: int = 1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment