docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OutgoingMessage

    Utility class for forming the data that is sent to the SideChannel.

    Inheritance
    object
    OutgoingMessage
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MLAgents.SideChannels
    Assembly: Unity.ML-Agents.dll
    Syntax
    public class OutgoingMessage : IDisposable

    Constructors

    OutgoingMessage()

    Create a new empty OutgoingMessage.

    Declaration
    public OutgoingMessage()

    Methods

    Dispose()

    Clean up the internal storage.

    Declaration
    public void Dispose()

    SetRawBytes(byte[])

    Overwrite the message with a specific byte array.

    Declaration
    public void SetRawBytes(byte[] data)
    Parameters
    Type Name Description
    byte[] data

    Data

    WriteBoolean(bool)

    Write a boolean value to the message.

    Declaration
    public void WriteBoolean(bool b)
    Parameters
    Type Name Description
    bool b

    Boolean value

    WriteFloat32(float)

    Write a float values to the message.

    Declaration
    public void WriteFloat32(float f)
    Parameters
    Type Name Description
    float f

    Float value

    WriteFloatList(IList<float>)

    Write a list or array of floats to the message.

    Declaration
    public void WriteFloatList(IList<float> floatList)
    Parameters
    Type Name Description
    IList<float> floatList

    Float list

    WriteInt32(int)

    Write an integer value to the message.

    Declaration
    public void WriteInt32(int i)
    Parameters
    Type Name Description
    int i

    Integer value

    WriteString(string)

    Write a string value to the message.

    Declaration
    public void WriteString(string s)
    Parameters
    Type Name Description
    string s

    String value

    Implements

    IDisposable
    In This Article
    Back to top
    Copyright © 2025 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)