docs.unity3d.com
    目次を表示する/隠す

    Class Extensions

    Provides some extension methods for various collections.

    Inheritance
    Object
    Extensions
    Namespace: Unity.Collections.LowLevel.Unsafe.NotBurstCompatible
    Syntax
    public static class Extensions

    Methods

    AddNBC(ref UnsafeAppendBuffer, String)

    Adds the content of a string to this append buffer.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed string")]
    public static void AddNBC(this ref UnsafeAppendBuffer buffer, string value)
    Parameters
    Type Name Description
    UnsafeAppendBuffer buffer

    The buffer to which to add the string.

    String value

    The string to copy.

    Remarks

    The length of the string is written as an int to the buffer before the characters are written.

    ReadNextNBC(ref UnsafeAppendBuffer.Reader, out String)

    Reads a string from this buffer reader.

    Declaration
    [ExcludeFromBurstCompatTesting("Managed string out argument")]
    public static void ReadNextNBC(this ref UnsafeAppendBuffer.Reader reader, out string value)
    Parameters
    Type Name Description
    UnsafeAppendBuffer.Reader reader

    This reader.

    String value

    Outputs the string.

    ToArray<T>(UnsafeParallelHashSet<T>)

    Returns a new managed array with all the elements copied from a set.

    Declaration
    public static T[] ToArray<T>(this UnsafeParallelHashSet<T> set)
        where T : struct, IEquatable<T>
    Parameters
    Type Name Description
    UnsafeParallelHashSet<T> set

    The set whose elements are copied to the array.

    Returns
    Type Description
    T[]

    A new managed array with all the elements copied from a set.

    Type Parameters
    Name Description
    T

    The type of elements.

    ToBytesNBC(ref UnsafeAppendBuffer)

    Returns an unmanaged byte array with a copy of this buffer's contents.

    Declaration
    [ExcludeFromBurstCompatTesting("Returns managed array")]
    public static byte[] ToBytesNBC(this ref UnsafeAppendBuffer buffer)
    Parameters
    Type Name Description
    UnsafeAppendBuffer buffer

    This buffer.

    Returns
    Type Description
    Byte[]

    An unmanaged byte array with a copy of this buffer's contents.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)