public static DevicePreviewWindow ShowEditor(System.Action onClose)
        {
            var editor = DevicePreviewWindow.CreateInstance <DevicePreviewWindow>();
            var title  = "UIW Preview";

                        #if !UNITY_4
            editor.titleContent = new GUIContent(title, UnityEngine.Resources.Load <Texture2D>("UI.Windows/Icons/FlowIcon"));
                        #else
            editor.title = title;
                        #endif
            editor.position = new Rect(0f, 0f, 1f, 1f);

            editor.autoRepaintOnSceneChange = true;
            editor.wantsMouseMove           = true;
            editor.gameView = new GameView(editor);

            editor.onClose = onClose;

            editor.Show();
            editor.Focus();

            Parser.Collect(forced: false);

            return(editor);
        }
        public static DevicePreviewWindow ShowEditor(System.Action onClose)
        {
            var editor = DevicePreviewWindow.CreateInstance <DevicePreviewWindow>();

            editor.title    = "UI.Windows: Device Preview";
            editor.position = new Rect(0f, 0f, 1f, 1f);

            editor.gameView = new GameView(editor);

            editor.onClose = onClose;

            editor.Show();
            editor.Focus();

            Parser.Collect(forced: false);

            return(editor);
        }