Class WriteExtensions | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class WriteExtensions

    Static class that contains various extension methods that allow writing data types to a buffer.

    Inheritance
    Object
    WriteExtensions
    Namespace: Unity.SnapshotDebugger
    Syntax
    public static class WriteExtensions

    Methods

    Write(Buffer, Color)

    Writes a color value to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Color value)
    Parameters
    Type Name Description
    Buffer buffer
    Color value

    The color value that should be written to the buffer.

    Write(Buffer, Color32)

    Writes a color32 value to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Color32 value)
    Parameters
    Type Name Description
    Buffer buffer
    Color32 value

    The color32 value that should be written to the buffer.

    Write(Buffer, Quaternion)

    Writes a quaternion to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Quaternion value)
    Parameters
    Type Name Description
    Buffer buffer
    Quaternion value

    The quaternion that should be written to the buffer.

    Write(Buffer, Boolean)

    Writes a boolean to the buffer.

    Declaration
    public static void Write(this Buffer buffer, bool value)
    Parameters
    Type Name Description
    Buffer buffer
    Boolean value

    The boolean that should be written to the buffer.

    Write(Buffer, Byte)

    Writes a single byte (8-bit value) to the buffer.

    Declaration
    public static void Write(this Buffer buffer, byte value)
    Parameters
    Type Name Description
    Buffer buffer
    Byte value

    The byte that should be written to the buffer.

    Write(Buffer, Byte[])

    Writes an array of bytes to the buffer.

    Declaration
    public static void Write(this Buffer buffer, byte[] bytes)
    Parameters
    Type Name Description
    Buffer buffer
    Byte[] bytes

    The array of bytes that should be written to the buffer.

    Write(Buffer, Byte[], Int32, Int32)

    Writes an array of bytes to the buffer.

    Declaration
    public static void Write(this Buffer buffer, byte[] bytes, int offset, int length)
    Parameters
    Type Name Description
    Buffer buffer
    Byte[] bytes

    The array of bytes that should be written to the buffer.

    Int32 offset

    Read offset in bytes where the bytes should be read from.

    Int32 length

    The number of bytes to be read from the input buffer.

    Write(Buffer, Int16)

    Writes a short (16-bit value) to the buffer.

    Declaration
    public static void Write(this Buffer buffer, short value)
    Parameters
    Type Name Description
    Buffer buffer
    Int16 value

    The short that should be written to the buffer.

    Write(Buffer, Int32)

    Writes an integer (32-bit value) to the buffer.

    Declaration
    public static void Write(this Buffer buffer, int value)
    Parameters
    Type Name Description
    Buffer buffer
    Int32 value

    The integer that should be written to the buffer.

    Write(Buffer, Single)

    Writes a floating point value to the buffer.

    Declaration
    public static void Write(this Buffer buffer, float value)
    Parameters
    Type Name Description
    Buffer buffer
    Single value

    The floating point value that should be written to the buffer.

    Write(Buffer, String)

    Writes a string to the buffer.

    Declaration
    public static void Write(this Buffer buffer, string value)
    Parameters
    Type Name Description
    Buffer buffer
    String value

    The string that should be written to the buffer.

    Write(Buffer, Buffer)

    Writes a buffer passed as argument to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Buffer other)
    Parameters
    Type Name Description
    Buffer buffer
    Buffer other

    Write(Buffer, Vector2)

    Writes a vector2 to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Vector2 value)
    Parameters
    Type Name Description
    Buffer buffer
    Vector2 value

    The vector2 that should be written to the buffer.

    Write(Buffer, Vector3)

    Writes a vector3 to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Vector3 value)
    Parameters
    Type Name Description
    Buffer buffer
    Vector3 value

    The vector3 that should be written to the buffer.

    Write(Buffer, Vector4)

    Writes a vector4 to the buffer.

    Declaration
    public static void Write(this Buffer buffer, Vector4 value)
    Parameters
    Type Name Description
    Buffer buffer
    Vector4 value

    The vector4 that should be written to the buffer.

    WriteComponent<T>(Buffer, T)

    Writes a component to the buffer.

    Declaration
    public static void WriteComponent<T>(this Buffer buffer, T component)
        where T : Component
    Parameters
    Type Name Description
    Buffer buffer
    T component

    The component that should be written to the buffer.

    Type Parameters
    Name Description
    T

    WriteQuantized(Buffer, Quaternion)

    Writes a quaternion to the buffer.

    Declaration
    public static void WriteQuantized(this Buffer buffer, Quaternion value)
    Parameters
    Type Name Description
    Buffer buffer
    Quaternion value

    The quaternion that should be written to the buffer.

    Remarks

    The quaternion will be stored in a quantized format.

    WriteQuantized(Buffer, Single)

    Writes a floating point value to the buffer.

    Declaration
    public static void WriteQuantized(this Buffer buffer, float value)
    Parameters
    Type Name Description
    Buffer buffer
    Single value

    The floating point value that should be written to the buffer.

    Remarks

    The floating point value will be stored in a quantized format.

    WriteQuantized(Buffer, Vector2)

    Writes a vector2 value to the buffer.

    Declaration
    public static void WriteQuantized(this Buffer buffer, Vector2 value)
    Parameters
    Type Name Description
    Buffer buffer
    Vector2 value

    The vector2 value that should be written to the buffer.

    Remarks

    The vector2 value will be stored in a quantized format.

    WriteQuantized(Buffer, Vector3)

    Writes a vector3 value to the buffer.

    Declaration
    public static void WriteQuantized(this Buffer buffer, Vector3 value)
    Parameters
    Type Name Description
    Buffer buffer
    Vector3 value

    The vector3 value that should be written to the buffer.

    Remarks

    The vector3 value will be stored in a quantized format.

    WriteQuantized(Buffer, Vector4)

    Writes a vector4 value to the buffer.

    Declaration
    public static void WriteQuantized(this Buffer buffer, Vector4 value)
    Parameters
    Type Name Description
    Buffer buffer
    Vector4 value

    The vector4 value that should be written to the buffer.

    Remarks

    The vector4 value will be stored in a quantized format.

    WriteToStream<T>(NativeArray<T>, Buffer)

    Writes a native array to the buffer.

    Declaration
    public static void WriteToStream<T>(this NativeArray<T> nativeArray, Buffer buffer)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> nativeArray
    Buffer buffer
    Type Parameters
    Name Description
    T

    WriteToStream<T>(NativeList<T>, Buffer)

    Writes a native list to the buffer.

    Declaration
    public static void WriteToStream<T>(this NativeList<T> nativeList, Buffer buffer)
        where T : struct
    Parameters
    Type Name Description
    NativeList<T> nativeList
    Buffer buffer
    Type Parameters
    Name Description
    T

    WriteTransform(Buffer, Transform)

    Writes a transform to the buffer.

    Declaration
    public static void WriteTransform(this Buffer buffer, Transform transform)
    Parameters
    Type Name Description
    Buffer buffer
    Transform transform

    The transform that should be written to the buffer.

    See Also

    Buffer
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023