static void Init() { // Get existing open window or if none, make a new one: VertexPainter window = EditorWindow.GetWindow <VertexPainter> ("VertexPainter"); window.Show(); }
private static void CreateWindow() { //Init window int x = 150, y = 150, w = 320, h = 150; window = (VertexPainter)GetWindow(typeof(VertexPainter), false); window.position = new Rect(x, y, w + x, h + y); window.minSize = new Vector2(w, h); window.maxSize = new Vector2(w + 2, h + 2); window.title = "Vertex Paint"; window.Show(); }