Class EditorWindowCaptureSettings
Settings for capturing an EditorWindow.
Inherited Members
Namespace: UnityEditor.TestTools.Graphics
Assembly: UnityEditor.TestTools.Graphics.dll
Syntax
public class EditorWindowCaptureSettings
Constructors
EditorWindowCaptureSettings(int, int, TimeSpan, params Action<EditorWindow>[])
Creates a new instance of EditorWindowCaptureSettings.
Declaration
public EditorWindowCaptureSettings(int width, int height, TimeSpan delayBeforeCapture, params Action<EditorWindow>[] additionalSetupActions)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the Editor window |
| int | height | The height of the Editor window |
| TimeSpan | delayBeforeCapture | How long to wait immediately before capturing |
| Action<EditorWindow>[] | additionalSetupActions | Additional actions to perform immediately right before the final delay |
Fields
k_DefaultCaptureSize
The default width and height used for window captures, in pixels.
Declaration
protected const int k_DefaultCaptureSize = 512
Field Value
| Type | Description |
|---|---|
| int |
Properties
AdditionalSetupActions
Additional setup actions to be performed before capturing the window.
Declaration
public IList<Action<EditorWindow>> AdditionalSetupActions { get; }
Property Value
| Type | Description |
|---|---|
| IList<Action<EditorWindow>> |
Remarks
These actions are performed after the window is set up and before the delay before capture.
Default
Default settings for capturing an EditorWindow.
Declaration
public static EditorWindowCaptureSettings Default { get; }
Property Value
| Type | Description |
|---|---|
| EditorWindowCaptureSettings |
Remarks
These settings are used when no specific settings are provided. The default width and height are both 512, and the delay before capture is zero.
DelayBeforeCapture
The delay before capturing the window. Defaults to zero.
Declaration
public TimeSpan DelayBeforeCapture { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Remarks
This can be useful for waiting for async operations to complete before capturing. This wait step happens after all other setup actions.
Height
The height of the captured image. Defaults to 512.
Declaration
public int Height { get; }
Property Value
| Type | Description |
|---|---|
| int |
Width
The width of the captured image. Defaults to 512.
Declaration
public int Width { get; }
Property Value
| Type | Description |
|---|---|
| int |