Struct NativeArraySharedValues<T> | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct NativeArraySharedValues<T>

    Merge sort index list referencing NativeArray values. Provide list of shared values, indices to shared values, and lists of source i value indices with identical shared value. As an example: Given Source NativeArray: AAABBCCAB Provides: Shared value indices: 000112201 Shared value counts: 432 Shared values: ABC Sorted indices: 012734856 Shared value start offsets (into sorted indices): 047

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Unity.Entities
    Syntax
    public struct NativeArraySharedValues<T> : IDisposable where T : struct, IComparable<T>
    Type Parameters
    Name Description
    T

    Constructors

    NativeArraySharedValues(NativeArray<T>, Allocator)

    Declaration
    public NativeArraySharedValues(NativeArray<T> source, Allocator allocator)
    Parameters
    Type Name Description
    NativeArray<T> source
    Allocator allocator

    Properties

    SharedValueCount

    Number of shared (unique) values in source NativeArray

    Declaration
    public int SharedValueCount { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    Dispose()

    Dispose internal buffer

    Declaration
    public void Dispose()
    Implements
    System.IDisposable.Dispose()

    GetBuffer()

    Get internal buffer for disposal

    Declaration
    public NativeArray<int> GetBuffer()
    Returns
    Type Description
    NativeArray<System.Int32>

    GetSharedIndexArray()

    Declaration
    public NativeArray<int> GetSharedIndexArray()
    Returns
    Type Description
    NativeArray<System.Int32>

    GetSharedIndexBySourceIndex(Int32)

    Index of shared value

    Declaration
    public int GetSharedIndexBySourceIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of source value

    Returns
    Type Description
    System.Int32

    GetSharedValueIndexCountArray()

    Declaration
    public NativeArray<int> GetSharedValueIndexCountArray()
    Returns
    Type Description
    NativeArray<System.Int32>

    GetSharedValueIndexCountBySourceIndex(Int32)

    Number of values which share the same value.

    Declaration
    public int GetSharedValueIndexCountBySourceIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Number of values which share the same value.

    Returns
    Type Description
    System.Int32

    GetSharedValueIndicesBySharedIndex(Int32)

    Array of indices into source NativeArray which share the same source value

    Declaration
    public NativeArray<int> GetSharedValueIndicesBySharedIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of shared value

    Returns
    Type Description
    NativeArray<System.Int32>

    GetSharedValueIndicesBySourceIndex(Int32)

    Array of indices into source NativeArray which share the same source value

    Declaration
    public NativeArray<int> GetSharedValueIndicesBySourceIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of source value

    Returns
    Type Description
    NativeArray<System.Int32>

    GetSortedIndices()

    Indices into source NativeArray sorted by value

    Declaration
    public NativeArray<int> GetSortedIndices()
    Returns
    Type Description
    NativeArray<System.Int32>

    Index NativeArray where each element refers to alement ini source NativeArray

    Schedule(JobHandle)

    Schedule jobs to collect and sort shared values.

    Declaration
    public JobHandle Schedule(JobHandle inputDeps)
    Parameters
    Type Name Description
    JobHandle inputDeps

    Dependent JobHandle

    Returns
    Type Description
    JobHandle

    JobHandle

    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