|
|
|
|
|
|
var stream = m_FileSystem.File.Create(filePath); |
|
|
|
m_DemoWriter = new DemonstrationWriter(stream); |
|
|
|
|
|
|
|
m_DemoWriter.Initialize( |
|
|
|
demonstrationName, |
|
|
|
behaviorParams.brainParameters, |
|
|
|
behaviorParams.fullyQualifiedBehaviorName |
|
|
|
); |
|
|
|
|
|
|
|
AddDemonstrationWriterToAgent(m_DemoWriter); |
|
|
|
|
|
|
|
return m_DemoWriter; |
|
|
|
|
|
|
/// <param name="demoWriter"></param>
|
|
|
|
public void AddDemonstrationWriterToAgent(DemonstrationWriter demoWriter) |
|
|
|
{ |
|
|
|
var behaviorParams = GetComponent<BehaviorParameters>(); |
|
|
|
demoWriter.Initialize( |
|
|
|
demonstrationName, |
|
|
|
behaviorParams.brainParameters, |
|
|
|
behaviorParams.fullyQualifiedBehaviorName |
|
|
|
); |
|
|
|
m_Agent.DemonstrationWriters.Add(demoWriter); |
|
|
|
} |
|
|
|
|
|
|
|