private void OnGUI() { if (!string.IsNullOrEmpty(m_ErrorString)) { EditorGUILayout.HelpBox("The object cannot be inspected. Please see below for the reason.\n\n" + m_ErrorString, MessageType.Info); return; } m_PropertyGrid.OnGUI(); }
public override void OnGUI() { base.OnGUI(); using (new EditorGUILayout.VerticalScope()) { using (new EditorGUILayout.HorizontalScope()) { var label = "Field(s)"; if (m_ManagedType.isValid) { label = m_ManagedType.name + " field(s)"; } EditorGUILayout.LabelField(label, EditorStyles.boldLabel, GUILayout.ExpandWidth(true)); m_ShowAsHex = GUILayout.Toggle(m_ShowAsHex, new GUIContent(HeEditorStyles.eyeImage, "Show Memory"), EditorStyles.miniButton, GUILayout.Width(30), GUILayout.Height(17)); } if (m_ShowAsHex != m_HexView.isVisible) { if (m_ShowAsHex) { m_HexView.Show(snapshot); } else { m_HexView.Hide(); } } if (m_ShowAsHex) { m_HexView.OnGUI(); } else { m_PropertyGrid.OnGUI(); } } }