public static void DrawVLogBodyGUI(VLog log) { var rect = EditorGUILayout.BeginVertical(); #if UNITY_2017_3_OR_NEWER if (Event.current.type == EventType.Repaint) #else if (Event.current.type == EventType.repaint) #endif { rect.height += 10f; var originalColor = GUI.color; GUI.color = _dgColor; Styles.BodyBackground.Draw(rect, false, false, false, false); GUI.color = originalColor; } EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Area: ", EditorStyles.boldLabel, GUILayout.Width(80f)); EditorGUILayout.LabelField(log.GetSourceDescription(), Styles.LabelStyle); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Object: ", EditorStyles.boldLabel, GUILayout.Width(80f)); EditorGUILayout.LabelField(log.objectPath, Styles.LabelStyle); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Message: ", EditorStyles.boldLabel, GUILayout.Width(80f)); EditorGUILayout.LabelField(log.message, Styles.LabelStyle); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(25f); if (log.source == VLogSource.Scene || log.source == VLogSource.Project) { EditorGUI.BeginDisabledGroup(!log.CanPingObject()); if (GUILayout.Button("Ping Object", GUILayout.Width(200f))) { if (OnPingObject != null) { OnPingObject(log); } } EditorGUI.EndDisabledGroup(); } if (log.source == VLogSource.Scene) { EditorGUI.BeginDisabledGroup(!log.CanLoadScene()); if (GUILayout.Button("Load Scene", GUILayout.Width(200f))) { if (OnLoadScene != null) { OnLoadScene(log); } } EditorGUI.EndDisabledGroup(); } GUILayout.Space(25f); EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); }