private static void ShowWindow()
        {
            Resolution currentResolution = Screen.currentResolution;

            left         = (currentResolution.width - width) / 2;
            top          = (currentResolution.height - height) / 2;
            windowArea   = new Rect((float)left, (float)top, (float)width, (float)height);
            win          = Window;
            win.position = windowArea;
            win.Show();
        }
Exemple #2
0
        static void ShowWindow()
        {
            Resolution res = Screen.currentResolution;

            left         = (res.width - width) / 2;
            top          = (res.height - height) / 2;
            windowArea   = new Rect(left, top, width, height);
            win          = Window;
            win.position = windowArea;
            win.Show();
        }
 private static void ShowWindow()
 {
     Resolution currentResolution = Screen.currentResolution;
     left = (currentResolution.width - width) / 2;
     top = (currentResolution.height - height) / 2;
     windowArea = new Rect((float) left, (float) top, (float) width, (float) height);
     win = Window;
     win.position = windowArea;
     win.Show();
 }