private bool LoadLogFile() { var path = EditorUtility.OpenFilePanel( "Import Log", "", "json"); if (!string.IsNullOrEmpty(path)) { var textReader = new StreamReader(path); var json = textReader.ReadToEnd(); _log = JsonUtility.FromJson <GoapLog>(json); return(true); } return(false); }
private void OnEditorLogDone(GoapLog log) { if (!_editorLogging) { return; } _log = log; Reset(); ConstructInfo(); ConstructGraph(); if (_autoPage) { _currentResult = _log.results.Count - 1; } }
public EditorGoapDebugger(global::System.Action <GoapLog> onLogDone) { _goapLog = new GoapLog(); _onLogDone = onLogDone; }