Class ImageHandler
Handles image events from the Unity Test Protocol.
Inherited Members
ScriptableSingleton<ImageHandler>.GetFilePath()
ScriptableSingleton<ImageHandler>.instance
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public class ImageHandler : ScriptableSingleton<ImageHandler>
Properties
ImageResultsPath
The path where images will be saved.
Declaration
public string ImageResultsPath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ReImportTextureWithSettings(string, TextureImporterSettings)
Re-imports the texture with the specified settings.
Declaration
public static void ReImportTextureWithSettings(string path, ImageHandler.TextureImporterSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path to the texture. |
| ImageHandler.TextureImporterSettings | settings | The settings to apply to the texture importer. |
SaveImage(ImageMessage, bool, TextureImporterSettings)
Saves the image to the specified path.
Declaration
public void SaveImage(ImageMessage imageMessage, bool hdr = false, ImageHandler.TextureImporterSettings textureImporterSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageMessage | imageMessage | The image message containing the image data. |
| bool | hdr | Whether the image is HDR. |
| ImageHandler.TextureImporterSettings | textureImporterSettings | The settings to apply to the texture importer. |