public void TestSaveJson() { var testData = new PAData { One = 11, Two = 12 }; _scenarioHandler = new NewtonsoftScenarioHandler(); _scenarioHandler.Save("scenario", testData); }
void OnGUI() { EditorGUILayout.BeginVertical(); EditorGUILayout.BeginHorizontal(); _savedFileName = EditorGUILayout.TextField("File Name", _savedFileName); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Save")) { _scenarioHandler.Save(_savedFileName, _scenarioData); Close(); } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); }