diff --git a/gym-unity/README.md b/gym-unity/README.md index d963d59f73..f664c16e46 100755 --- a/gym-unity/README.md +++ b/gym-unity/README.md @@ -67,6 +67,8 @@ The returned environment `env` will function as a gym. be accessed from the `info` provided by `env.step(action)`. - Stacked vector observations are not supported. - Environment registration for use with `gym.make()` is currently not supported. +- Calling env.render() will not render a new frame of the environment. It will + return the latest visual observation if using visual observations. ## Running OpenAI Baselines Algorithms diff --git a/gym-unity/gym_unity/envs/__init__.py b/gym-unity/gym_unity/envs/__init__.py index 0f70712947..322d83659b 100644 --- a/gym-unity/gym_unity/envs/__init__.py +++ b/gym-unity/gym_unity/envs/__init__.py @@ -278,6 +278,10 @@ def _get_vec_obs_size(self) -> int: return result def render(self, mode="rgb_array"): + """ + Return the latest visual observations. + Note that it will not render a new frame of the environment. + """ return self.visual_obs def close(self) -> None: