docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ArtifactFileMessage
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)