Exemple #1
0
        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);
        }
Exemple #2
0
 private void OnEditorLogDone(GoapLog log)
 {
     if (!_editorLogging)
     {
         return;
     }
     _log = log;
     Reset();
     ConstructInfo();
     ConstructGraph();
     if (_autoPage)
     {
         _currentResult = _log.results.Count - 1;
     }
 }
Exemple #3
0
 public EditorGoapDebugger(global::System.Action <GoapLog> onLogDone)
 {
     _goapLog   = new GoapLog();
     _onLogDone = onLogDone;
 }