Думаю использовать Application.CaptureScreenshot.
Как можно изменить разрешение окна Game?
Ничего не нашел.
public class Generate2DIcons : ScriptableObject
{
[MenuItem ("Custom/Generate2DIcons")]
static void Generate()
{
//Texture2D tex;
EditorApplication.NewScene();
UnityEditor.SceneView.currentDrawingSceneView.maxSize = new Vector2(64f, 64f);
Application.CaptureScreenshot("icon.png");
}
}