protected void LoadExperienceDatabase() { Qexp = new QExperience(); var exps = QStory.LoadForScene("QData/Story", EditorApplication.currentScene) .SelectMany(qs => qs.ImitationExperiences.Select(qi => qi.Experience)) .SelectMany(e => e).ToList(); Debug.Log("Loading " + exps.Count + " imitation experiences"); foreach (var sars in exps) { StoreSARS(sars); } }
private void Init() { if (_init) { return; } _init = true; _manager = CreateManager(); _agent = _manager.ActiveAgent; _tester = _manager.Tester; _mode = _manager.Mode; _remake = _manager.Remake; _term = _manager.Terminator; Directory.CreateDirectory(STORY_PATH); _stories = QStory.LoadForScene(STORY_PATH, EditorApplication.currentScene); // Should read this when serialization works _currentStory = _currentStory == null ? null : _stories.Find(s => s.Id == _currentStory.Id); _benchmark = _manager.Benchmark; }