private void OnGUI() { if (m_ActiveGameObjects == null || m_ActiveGameObjects.Length == 0 || m_ActiveGameObjects[0] == null) { return; } using (EditorGUILayoutEx.ScrollView(ref m_ScrollPosition)) { foreach (var i in m_ActiveSpyglassEditors) { using (GUILayoutEx.Vertical()) { i.Item2 = EditorGUILayout.InspectorTitlebar(i.Item2, ((Editor)i.Item1).target); if (i.Item2) { try { i.Item1.OnSpyglassGUI(); } catch (Exception e) { if (GUIUtilityEx.ShouldRethrowException(e)) { throw; } Debug.LogException(e); } } } } } }
public static bool ShouldRethrowException(Exception exception) { return(GUIUtilityEx.IsExitGUIException(exception)); }