浏览代码

[bug-fix] Fix null ref exception in the demo recorder (#5274)

* Fix null ref exception in the demo recorder

* Update changelog

* Clearer logic
/check-for-ModelOverriders
GitHub 4 年前
当前提交
a2a4ec07
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 1
      com.unity.ml-agents/CHANGELOG.md
  2. 7
      com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs

1
com.unity.ml-agents/CHANGELOG.md


or actuators on your system. (#5194)
- Removed additional memory allocations that were occurring due to assert messages and iterating of DemonstrationRecorders. (#5246)
- Fixed a bug where agent trying to access unintialized fields when creating a new RayPerceptionSensorComponent on an agent. (#5261)
- Fixed a bug where the DemonstrationRecorder would throw a null reference exception if Num Steps To Record was > 0 and Record was turned off. (#5274)
#### ml-agents / ml-agents-envs / gym-unity (Python)
- Fixed a bug where --results-dir has no effect. (#5269)

7
com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs


void Update()
{
if (Record)
if (!Record)
LazyInitialize();
return;
LazyInitialize();
// Quit when num steps to record is reached
if (NumStepsToRecord > 0 && m_DemoWriter.NumSteps >= NumStepsToRecord)
{
Application.Quit(0);

正在加载...
取消
保存