docs.unity3d.com
    Show / Hide Table of Contents

    Class NativeArrayUtils

    Utility methods for NativeArray<T>

    Inheritance
    Object
    NativeArrayUtils
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Syntax
    public static class NativeArrayUtils

    Methods

    EnsureCapacity<T>(ref NativeArray<T>, Int32, Allocator, NativeArrayOptions)

    Ensure that this array is large enough to contain the given capacity

    Declaration
    public static void EnsureCapacity<T>(ref NativeArray<T> array, int capacity, Allocator allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
        where T : struct
    Parameters
    Type Name Description
    NativeArray<T> array

    The array reference. This will be overwritten when the array grows in size

    Int32 capacity

    The minimum number of elements that the array must contain

    Allocator allocator

    The allocator to use when creating a new array, if needed

    NativeArrayOptions options

    The options to use when creating the new array, if needed

    Type Parameters
    Name Description
    T

    The type of array element

    Back to top
    Terms of use
    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