public static void ShowNotification(UnityEditor.EditorWindow editor, GUIContent content, float time = 2)
    {
#if UNITY_2019_1_OR_NEWER
        editor.ShowNotification(content, time);
#else
        editor.ShowNotification(content);
#endif
    }
 public void OnGUILayout(EditorWindow window)
 {
     this.OnGUI();
     if (AttachProfilerUI.ms_NotificationMessage != null)
     {
         window.ShowNotification(AttachProfilerUI.ms_NotificationMessage);
     }
     else
     {
         window.RemoveNotification();
     }
 }
Exemple #3
0
        public void OnGUILayout(EditorWindow window)
        {
            OnGUI();

            if (ms_NotificationMessage != null)
            {
                window.ShowNotification(ms_NotificationMessage);
            }
            else
            {
                window.RemoveNotification();
            }
        }
 public void OnGUILayout(EditorWindow window)
 {
     if (this.m_CurrentProfiler == null)
     {
         this.m_CurrentProfiler = EditorGUIUtility.TextContent("Active Profiler|Select connected player to profile");
     }
     this.OnGUI(GUILayoutUtility.GetRect(this.m_CurrentProfiler, EditorStyles.toolbarDropDown, new GUILayoutOption[1]
     {
         GUILayout.Width(100f)
     }), this.m_CurrentProfiler);
     if (AttachProfilerUI.ms_NotificationMessage != null)
     {
         window.ShowNotification(AttachProfilerUI.ms_NotificationMessage);
     }
     else
     {
         window.RemoveNotification();
     }
 }
Exemple #5
0
        public void OnGUILayout(EditorWindow window)
        {
            if (this.m_CurrentProfiler == null)
            {
                this.m_CurrentProfiler = EditorGUIUtility.TextContent("Connected Player|Select player to connect to for receiving profiler and log data.");
            }
            Rect rect = GUILayoutUtility.GetRect(this.m_CurrentProfiler, EditorStyles.toolbarDropDown, new GUILayoutOption[]
            {
                GUILayout.Width(100f)
            });

            this.OnGUI(rect, this.m_CurrentProfiler);
            if (AttachProfilerUI.ms_NotificationMessage != null)
            {
                window.ShowNotification(AttachProfilerUI.ms_NotificationMessage);
            }
            else
            {
                window.RemoveNotification();
            }
        }