浏览代码

add numSteps property and update recorder script

/hh-develop-max-steps-demo-recorder
HH 4 年前
当前提交
1fb74e2f
共有 2 个文件被更改,包括 18 次插入0 次删除
  1. 10
      com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs
  2. 8
      com.unity.ml-agents/Runtime/Demonstrations/DemonstrationWriter.cs

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


public bool Record;
/// <summary>
/// Number of steps to record. Editor will stop playing when it hits this threshold.
/// </summary>
public int numStepsToRecord = 5000;
/// <summary>
/// Base demonstration file name. If multiple files are saved, the additional filenames
/// will have a sequence of unique numbers appended.
/// </summary>

if (Record)
{
LazyInitialize();
}
if (m_DemoWriter.NumSteps >= numStepsToRecord)
{
UnityEditor.EditorApplication.isPlaying = false;
}
}

8
com.unity.ml-agents/Runtime/Demonstrations/DemonstrationWriter.cs


}
/// <summary>
/// Number of steps written so far.
/// </summary>
internal int NumSteps
{
get { return m_MetaData.numberSteps; }
}
/// <summary>
/// Writes the initial data to the stream.
/// </summary>
/// <param name="demonstrationName">Base name of the demonstration file(s).</param>

正在加载...
取消
保存