public override void OnInspectorGUI() { serializedObject.Update(); EZEditorGUIUtility.ScriptableObjectTitle(target as ScriptableObject, !serializedObject.isEditingMultipleObjects); scrollPosition = GUILayout.BeginScrollView(scrollPosition); itemList.DoLayoutList(); GUILayout.EndScrollView(); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); EZEditorGUIUtility.ScriptableObjectTitle(target as ScriptableObject, !serializedObject.isEditingMultipleObjects); EditorGUILayout.PropertyField(m_FilePath); if (GUILayout.Button("Open Folder")) { if (!string.IsNullOrEmpty(m_FilePath.stringValue)) { Directory.CreateDirectory(m_FilePath.stringValue); } string projectPath = Application.dataPath.Substring(0, Application.dataPath.Length - 7); Application.OpenURL(string.Format("file://{0}/{1}", projectPath, m_FilePath.stringValue)); } EditorGUILayout.Space(); EditorGUILayout.HelpBox("Game View Capture is only available when playing", MessageType.Info); GUI.enabled = EditorApplication.isPlaying; if (GUILayout.Button("Game View Capture")) { if (!string.IsNullOrEmpty(m_FilePath.stringValue)) { Directory.CreateDirectory(m_FilePath.stringValue); } capturer.ScreenCapture(GetPath()); } GUI.enabled = true; EditorGUILayout.Space(); camera = (Camera)EditorGUILayout.ObjectField("Target Camera", camera, typeof(Camera), true); EditorGUILayout.PropertyField(m_Resolution); EditorGUILayout.PropertyField(m_TextureFormat); if (camera == null) { GUI.enabled = false; } if (GUILayout.Button("Camera Capture")) { if (!string.IsNullOrEmpty(m_FilePath.stringValue)) { Directory.CreateDirectory(m_FilePath.stringValue); } capturer.CameraCapture(camera, GetPath()); } GUI.enabled = true; serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { EZEditorGUIUtility.ScriptableObjectTitle(target as ScriptableObject); serializedObject.Update(); if (GUILayout.Button("Execute")) { renamer.Execute(); } EditorGUILayout.PropertyField(m_IndexStep); EditorGUILayout.PropertyField(m_IndexOffset); EditorGUILayout.PropertyField(m_IndexFormat); EditorGUILayout.PropertyField(m_CaptureRegex); objectList.DoLayoutList(); serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { serializedObject.Update(); EZEditorGUIUtility.ScriptableObjectTitle(target as ScriptableObject, !serializedObject.isEditingMultipleObjects); scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); EditorGUILayout.LabelField("File Association", EditorStyles.boldLabel); EditorGUI.indentLevel++; EditorGUILayout.PropertyField(m_FilePatterns, true); EditorGUILayout.PropertyField(m_IncludePaths, true); EditorGUILayout.PropertyField(m_ExcludePaths, true); EditorGUI.indentLevel--; EditorGUILayout.LabelField("Analysis", EditorStyles.boldLabel); EditorGUI.indentLevel++; EditorGUILayout.PropertyField(m_InfoLineCount); EditorGUILayout.PropertyField(m_AuthorRegex); EditorGUILayout.PropertyField(m_CreateTimeRegex); EditorGUILayout.PropertyField(m_ValidLineRegex); EditorGUILayout.HelpBox(new StringBuilder() .AppendLine(@"'^\W*(\w+)[\S\s]*$': line contains word characters") .AppendLine(@"'^\W*(\S+)[\S\s]*$': line contains non-white-space characters") .ToString(), MessageType.Info); EditorGUI.indentLevel--; if (GUILayout.Button("Refresh")) { RefreshResult(); } EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Result: " + targetObject.resultTime, EditorStyles.boldLabel); showAsAsset = EditorGUILayout.Toggle("Show Script As TextAsset", showAsAsset); EditorGUILayout.EndHorizontal(); EditorGUI.indentLevel++; DrawResult(targetObject); EditorGUI.indentLevel--; EditorGUILayout.EndScrollView(); serializedObject.ApplyModifiedProperties(); }