void FindAllFilePaths() { if (serializedObject != null) { string scriptLocation = JSAMEditorHelper.GetMonoScriptPathFor(typeof(AudioManager)); packageLocation.stringValue = scriptLocation.Substring(0, scriptLocation.IndexOf("Scripts/AudioManager.cs")); prefabsLocation.stringValue = packageLocation.stringValue + "Prefabs/"; presetsLocation.stringValue = packageLocation.stringValue + "Presets/"; serializedObject.ApplyModifiedProperties(); } }
private void OnGUI() { if (serializedObject == null) { } else { GUIContent blontent = new GUIContent("JSAM Install Folder", "JSAM is stored here"); EditorGUILayout.BeginHorizontal(); EditorGUILayout.TextField(blontent, packageLocation.stringValue); if (GUILayout.Button("Refresh")) { FindAllFilePaths(); packageLocation.stringValue = JSAMEditorHelper.GetMonoScriptPathFor(typeof(AudioManager)); } EditorGUILayout.EndHorizontal(); GUILayout.Label("Benis", EditorStyles.boldLabel); // //if () } }