Simulator Editor Screenshot

Summary

  • Overview: This package is an Editor extension for the Unity Device Simulator that provides a convenient, scriptable screenshot tool to help you generate high-quality screenshots across different devices for store assets, UI testing, or documentation.

Description

  • Customizability: Offers a scriptable API and editor menu items, supporting custom output paths, device orientation, and inclusion of device skins. Ideal for projects that need a consistent screenshot workflow across multiple devices.
  • Use Cases: Quickly prepare portrait and landscape screenshots for Unity Store, App Store / Google Play, capture comparison images for automated tests, or batch export the current Simulator state during design reviews.

Usage Examples

  • Quick menu (manual):

    • In the Unity Editor, select: Tools > Simulator Capture Screenshot (sample menu item; Samples import required).
  • Call from an editor script (example):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using kkmaple.Editor;
using System.IO;
using UnityEditor;
using UnityEngine;

public static class SimulatorCaptureExample
{
[MenuItem("Tools/Simulator Example Capture")]
public static void CaptureExample()
{
var outputFolder = "Screenshots";
var outputFileName = $"SimulatorScreenshot_{System.DateTime.Now:yyyyMMdd_HHmmss}.png";
var outputPath = Path.Combine(outputFolder, outputFileName);

if (!Directory.Exists(outputFolder))
Directory.CreateDirectory(outputFolder);


SimulatorScreenshot.CaptureScreenshot(outputPath);

Debug.Log($"Simulator screenshot saved: {outputPath}");

EditorUtility.RevealInFinder(outputPath);
}
}

Technical Support

If you encounter any problems during use, you can get help through the following method:

0%