Class SceneViewCaptureSettings
Settings for capturing a SceneView.
Inherited Members
Namespace: UnityEditor.TestTools.Graphics
Assembly: UnityEditor.TestTools.Graphics.dll
Syntax
public class SceneViewCaptureSettings : EditorWindowCaptureSettings
Constructors
SceneViewCaptureSettings(int, int, TimeSpan, TimeSpan, Transform, params Action<EditorWindow>[])
Creates a new instance of SceneViewCaptureSettings.
Declaration
public SceneViewCaptureSettings(int width, int height, TimeSpan delayBeforeCapture, TimeSpan timeout, Transform imageComparisonViewpoint, params Action<EditorWindow>[] additionalSetupActions)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the SceneView window |
| int | height | The height of the SceneView window |
| TimeSpan | delayBeforeCapture | How long to wait immediately before capturing |
| TimeSpan | timeout | The maximum time to wait for async operations to complete |
| Transform | imageComparisonViewpoint | The world-space viewpoint to make the capture from |
| Action<EditorWindow>[] | additionalSetupActions | Additional actions to perform immediately right before the final delay |
Properties
Default
Default settings for capturing a SceneView.
Declaration
public static SceneViewCaptureSettings Default { get; }
Property Value
| Type | Description |
|---|---|
| SceneViewCaptureSettings |
Remarks
These settings are used when no specific settings are provided. The default width and height are both 512, the delay before capture is zero, and the timeout is 10 seconds. The image comparison viewpoint is set to the last active scene view camera transform.
ImageComparisonViewpoint
The viewpoint transform to use for the image comparison.
Declaration
public Transform ImageComparisonViewpoint { get; }
Property Value
| Type | Description |
|---|---|
| Transform |
Timeout
The maximum time to wait for the scene view to update (for async shader compilation etc.)
Declaration
public TimeSpan Timeout { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Remarks
This is used in the SceneView setup to wait for the viewpoint to update to the correct state and for shader compilation to finish. If you have a scene that takes a long time to compile shaders or the viewpoint is very far from the default scene view camera position, you may need to increase this value to ensure the scene view is ready for capture. An error will be logged if the timeout is exceeded.