Advertisement
Guest User

Code Sample EditorWindow

a guest
Sep 21st, 2015
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Collections;
  4.  
  5. public class TestEditor : EditorWindow
  6. {
  7.  
  8. [MenuItem("Framework/Test Editor")]
  9. static void Initialize()
  10. {
  11. // Open the window, set the title
  12. TestEditor window = (TestEditor)GetWindow(typeof(TestEditor), false, "Test Editor", true);
  13.  
  14. window.Show();
  15. }
  16.  
  17. void OnGUI()
  18. {
  19. this.minSize = new Vector2(1000, 675);
  20. GUILayout.Label("Some text that is sharp");
  21.  
  22. GUILayout.BeginArea(new Rect(2.5f, this.position.height / 2 + 20, this.position.width, 25));
  23. GUILayout.Label("Some text that is blurry");
  24. GUILayout.EndArea();
  25. }
  26.  
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement