using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Prefab : EditorWindow
{
[SerializeField] private GameObject prefab;
List<Transform> transformSelection = new List<Transform>();
int transformsCount = 0;
[MenuItem("Tools/Prefab")]
static void CreatePrefab()
{
EditorWindow.GetWindow<Prefab>();
//GetWindow<Prefab>().position = new Rect(980, 380, 322, 278);
GetWindow<Prefab>().position = new Rect(Screen.width / 2, Screen.height / 2, 322, 278);
}
Это поместит окно в центр по ширине, но в верхней части экрана.
![EditorWindow](https://i.stack.imgur.com/oTSja.jpg)
Я не уверен, чтодаже ширина посередине.Но высота сверху.
Большой белый прямоугольник - это окно.