docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SerializeValuePreChecked

    SerializeValuePreChecked(ref string, bool)

    Serialize a string, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref string s, bool oneByteChars = false)
    Parameters
    Type Name Description
    string s

    The value to read/write

    bool oneByteChars

    If true, characters will be limited to one-byte ASCII characters

    SerializeValuePreChecked(ref byte)

    Serialize a byte, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref byte value)
    Parameters
    Type Name Description
    byte value

    The value to read/write

    SerializeValuePreChecked<T>(ref T, ForPrimitives)

    Serialize a primitive, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T value, FastBufferWriter.ForPrimitives unused = default) where T : unmanaged, IComparable, IConvertible, IComparable<T>, IEquatable<T>
    Parameters
    Type Name Description
    T value

    The value to read/write

    FastBufferWriter.ForPrimitives unused

    An unused parameter used for enabling overload resolution based on generic constraints

    Type Parameters
    Name Description
    T

    The network serializable type

    SerializeValuePreChecked<T>(ref T[], ForPrimitives)

    Serialize an array of primitives, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T[] value, FastBufferWriter.ForPrimitives unused = default) where T : unmanaged, IComparable, IConvertible, IComparable<T>, IEquatable<T>
    Parameters
    Type Name Description
    T[] value

    The values to read/write

    FastBufferWriter.ForPrimitives unused

    An unused parameter used for enabling overload resolution of primitives

    Type Parameters
    Name Description
    T

    The network serializable types in an array

    SerializeValuePreChecked<T>(ref T, ForEnums)

    Serialize an enum, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T value, FastBufferWriter.ForEnums unused = default) where T : unmanaged, Enum
    Parameters
    Type Name Description
    T value

    The values to read/write

    FastBufferWriter.ForEnums unused

    An unused parameter used for enabling overload resolution of enums

    Type Parameters
    Name Description
    T

    The network serializable type

    SerializeValuePreChecked<T>(ref T[], ForEnums)

    Serialize an array of enums, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T[] value, FastBufferWriter.ForEnums unused = default) where T : unmanaged, Enum
    Parameters
    Type Name Description
    T[] value

    The values to read/write

    FastBufferWriter.ForEnums unused

    An unused parameter used for enabling overload resolution of enums

    Type Parameters
    Name Description
    T

    The network serializable types in an array

    SerializeValuePreChecked<T>(ref T, ForStructs)

    Serialize a struct, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T value, FastBufferWriter.ForStructs unused = default) where T : unmanaged, INetworkSerializeByMemcpy
    Parameters
    Type Name Description
    T value

    The values to read/write

    FastBufferWriter.ForStructs unused

    An unused parameter used for enabling overload resolution of structs

    Type Parameters
    Name Description
    T

    The network serializable type

    SerializeValuePreChecked<T>(ref T[], ForStructs)

    Serialize an array of structs, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T[] value, FastBufferWriter.ForStructs unused = default) where T : unmanaged, INetworkSerializeByMemcpy
    Parameters
    Type Name Description
    T[] value

    The values to read/write

    FastBufferWriter.ForStructs unused

    An unused parameter used for enabling overload resolution of structs

    Type Parameters
    Name Description
    T

    The network serializable types in an array

    SerializeValuePreChecked<T>(ref NativeArray<T>, Allocator, ForGeneric)

    Serialize a NativeArray of structs, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref NativeArray<T> value, Allocator allocator, FastBufferWriter.ForGeneric unused = default) where T : unmanaged
    Parameters
    Type Name Description
    NativeArray<T> value

    The values to read/write

    Allocator allocator

    The allocator to use to construct the resulting NativeArray when reading

    FastBufferWriter.ForGeneric unused

    An unused parameter used for enabling overload resolution of structs

    Type Parameters
    Name Description
    T

    The network serializable types in an array

    SerializeValuePreChecked(ref Vector2)

    Serialize a Vector2, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector2 value)
    Parameters
    Type Name Description
    Vector2 value

    The value to read/write

    SerializeValuePreChecked(ref Vector2[])

    Serialize a Vector2 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector2[] value)
    Parameters
    Type Name Description
    Vector2[] value

    The values to read/write

    SerializeValuePreChecked(ref Vector3)

    Serialize a Vector3, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector3 value)
    Parameters
    Type Name Description
    Vector3 value

    The value to read/write

    SerializeValuePreChecked(ref Vector3[])

    Serialize a Vector3 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector3[] value)
    Parameters
    Type Name Description
    Vector3[] value

    The values to read/write

    SerializeValuePreChecked(ref Vector2Int)

    Serialize a Vector2Int, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector2Int value)
    Parameters
    Type Name Description
    Vector2Int value

    The value to read/write

    SerializeValuePreChecked(ref Vector2Int[])

    Serialize a Vector2Int array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector2Int[] value)
    Parameters
    Type Name Description
    Vector2Int[] value

    The values to read/write

    SerializeValuePreChecked(ref Vector3Int)

    Serialize a Vector3Int, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector3Int value)
    Parameters
    Type Name Description
    Vector3Int value

    The value to read/write

    SerializeValuePreChecked(ref Vector3Int[])

    Serialize a Vector3Int array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector3Int[] value)
    Parameters
    Type Name Description
    Vector3Int[] value

    The value to read/write

    SerializeValuePreChecked(ref Vector4)

    Serialize a Vector4, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector4 value)
    Parameters
    Type Name Description
    Vector4 value

    The value to read/write

    SerializeValuePreChecked(ref Vector4[])

    Serialize a Vector4 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Vector4[] value)
    Parameters
    Type Name Description
    Vector4[] value

    The value to read/write

    SerializeValuePreChecked(ref Quaternion)

    Serialize a Quaternion, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Quaternion value)
    Parameters
    Type Name Description
    Quaternion value

    The value to read/write

    SerializeValuePreChecked(ref Quaternion[])

    Serialize a Quaternion array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Quaternion[] value)
    Parameters
    Type Name Description
    Quaternion[] value

    The value to read/write

    SerializeValuePreChecked(ref Color)

    Serialize a Color, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Color value)
    Parameters
    Type Name Description
    Color value

    The value to read/write

    SerializeValuePreChecked(ref Color[])

    Serialize a Color array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Color[] value)
    Parameters
    Type Name Description
    Color[] value

    The value to read/write

    SerializeValuePreChecked(ref Color32)

    Serialize a Color32, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Color32 value)
    Parameters
    Type Name Description
    Color32 value

    The value to read/write

    SerializeValuePreChecked(ref Color32[])

    Serialize a Color32 array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Color32[] value)
    Parameters
    Type Name Description
    Color32[] value

    The value to read/write

    SerializeValuePreChecked(ref Ray)

    Serialize a Ray, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Ray value)
    Parameters
    Type Name Description
    Ray value

    The value to read/write

    SerializeValuePreChecked(ref Ray[])

    Serialize a Ray array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Ray[] value)
    Parameters
    Type Name Description
    Ray[] value

    The value to read/write

    SerializeValuePreChecked(ref Ray2D)

    Serialize a Ray2D, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Ray2D value)
    Parameters
    Type Name Description
    Ray2D value

    The value to read/write

    SerializeValuePreChecked(ref Ray2D[])

    Serialize a Ray2D array, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked(ref Ray2D[] value)
    Parameters
    Type Name Description
    Ray2D[] value

    The value to read/write

    SerializeValuePreChecked<T>(ref T, ForFixedStrings)

    Serialize a FixedString, "pre-checked", which skips buffer checks. In debug and editor builds, a check is made to ensure you've called "PreCheck" before calling this. In release builds, calling this without calling "PreCheck" may read or write past the end of the buffer, which will cause memory corruption and undefined behavior.

    Declaration
    public void SerializeValuePreChecked<T>(ref T value, FastBufferWriter.ForFixedStrings unused = default) where T : unmanaged, INativeList<byte>, IUTF8Bytes
    Parameters
    Type Name Description
    T value

    The value to read/write

    FastBufferWriter.ForFixedStrings unused

    An unused parameter that can be used for enabling overload resolution for fixed strings

    Type Parameters
    Name Description
    T

    The network serializable type

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