Exemplo n.º 1
0
		public static void ShowWindowAndValidate()
		{
			// Lets assume that everyone window is at least 520 x 448
			float windowWidth = 512;
			float windowHeight = 512;
			Rect rect = new Rect((Screen.currentResolution.width - windowWidth) / 2.0f,
			                     (Screen.currentResolution.height - windowHeight) / 2.0f,
			                     windowWidth , windowHeight);
			window = (ValidationWindow) EditorWindow.GetWindowWithRect(typeof(ValidationWindow), rect, true, "Validation Results");
			window.minSize = new Vector2 (windowWidth, windowHeight);
			window.maxSize = new Vector2 (windowWidth, windowHeight);
			window.position = rect;
			window.Show();
			window.DoValidate ();
		}
Exemplo n.º 2
0
        public static void ShowWindowAndValidate()
        {
            // Lets assume that everyone window is at least 520 x 448
            float windowWidth  = 512;
            float windowHeight = 512;
            Rect  rect         = new Rect((Screen.currentResolution.width - windowWidth) / 2.0f,
                                          (Screen.currentResolution.height - windowHeight) / 2.0f,
                                          windowWidth, windowHeight);

            window          = (ValidationWindow)EditorWindow.GetWindowWithRect(typeof(ValidationWindow), rect, true, "Validation Results");
            window.minSize  = new Vector2(windowWidth, windowHeight);
            window.maxSize  = new Vector2(windowWidth, windowHeight);
            window.position = rect;
            window.Show();
            window.DoValidate();
        }