Class ArtifactFileMessage
A player-to-host message carrying an arbitrary file (bytes plus a directory and file name) to be collected as a test artifact. Unlike ImageMessage, the file name is used verbatim, so any extension is preserved.
Inherited Members
Namespace: UnityEngine.TestTools.Graphics
Assembly: UnityEngine.TestTools.Graphics.dll
Syntax
public class ArtifactFileMessage
Properties
Data
The file contents.
Declaration
public byte[] Data { get; set; }
Property Value
| Type | Description |
|---|---|
| byte[] |
FileName
The file name, including its extension, used verbatim.
Declaration
public string FileName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MessageId
The message ID. Must match the TestArtifactFileMessage serializer on the UnifiedTestRunner host.
Declaration
public static Guid MessageId { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
PathName
The directory (relative to the run's artifacts path) the file is written under.
Declaration
public string PathName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(byte[])
Deserializes a byte array produced by Serialize().
Declaration
public static ArtifactFileMessage Deserialize(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The serialized byte array. |
Returns
| Type | Description |
|---|---|
| ArtifactFileMessage | The deserialized message. |
Serialize()
Serializes the message to a byte array.
Declaration
public byte[] Serialize()
Returns
| Type | Description |
|---|---|
| byte[] | The serialized byte array representation of the message. |