// Plays a list of commands through the agent and writes a report: for testing your scene and for demos. // one command per line; "// ..." comments; "#answer " answers the pending question; "#look |none" // sets the gaze; "#wait " pauses (not counted in any step's time). // In the Editor: assign a TextAsset and press Play. In a built game or batch run: // Game.exe -sceneAgentScript commands.txt [-sceneAgentOut ] [-sceneAgentShots] (quits when done) // Report: /report.json with every step's calls, results, answer, error, seconds and the scene signature. using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using UnityEngine; namespace SceneAgent { [RequireComponent(typeof(SceneAgentSession))] public class SceneAgentScriptRunner : MonoBehaviour { public TextAsset script; [Tooltip("Output folder (relative = under Application.persistentDataPath). Empty: SceneAgentRuns/