docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NativeListExt

    Provides Extension methods for the NativeList class

    Inheritance
    object
    NativeListExt
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Networking.Transport.Utilities
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public static class NativeListExt

    Methods

    ResizeUninitializedTillPowerOf2<T>(NativeList<T>, int)

    This function will make sure that sizeToFit can fit into list. If sizeToFit >= list's Length then list will be ResizeUninitialized to a new length. New Length will be the next highest power of 2 of sizeToFit

    Declaration
    public static void ResizeUninitializedTillPowerOf2<T>(this NativeList<T> list, int sizeToFit) where T : unmanaged
    Parameters
    Type Name Description
    NativeList<T> list

    List that should be resized if sizeToFit >= its size

    int sizeToFit

    Requested size that should fit into list

    Type Parameters
    Name Description
    T
    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)