docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EntityIndexInQuery

    Specifies that this int parameter is used as a way to get the packed entity index inside the current query. Usage: An int parameter found inside the execute method of an IJobEntity.

    Inheritance
    object
    Attribute
    EntityIndexInQuery
    Namespace: Unity.Entities
    Assembly: Unity.Entities.dll
    Syntax
    [AttributeUsage(AttributeTargets.Parameter)]
    public sealed class EntityIndexInQuery : Attribute
    Remarks

    This is generally way more expensive than ChunkIndexInQuery and EntityIndexInChunk. As it it will schedule a CalculateBaseEntityIndexArrayAsync(AllocatorHandle, JobHandle, out JobHandle) job to get an offset buffer. If you just want a sortkey for your EntityCommandBuffer.ParallelWriter simply use ChunkIndexInQuery as it is different for every thread, which is all a ParallelWriter needs to sort with.

    See Also

    IJobEntity
    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)