docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EntityInQueryIndex

    Obsolete. Use EntityIndexInQuery instead.

    Inheritance
    object
    Attribute
    EntityInQueryIndex
    Namespace: Unity.Entities
    Assembly: Unity.Entities.dll
    Syntax
    [AttributeUsage(AttributeTargets.Parameter)]
    [Obsolete("Use EntityIndexInQuery (Removed after Entities 1.0) (UnityUpgradable) -> EntityIndexInQuery", true)]
    public sealed class EntityInQueryIndex : Attribute
    Remarks

    Obsolete. Use EntityIndexInQuery instead.

     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.
    
     This is generally way more expensive than <xref href="Unity.Entities.ChunkIndexInQuery" data-throw-if-not-resolved="false"></xref> and <xref href="Unity.Entities.EntityIndexInChunk" data-throw-if-not-resolved="false"></xref>.
     As it it will schedule a <xref href="Unity.Entities.EntityQuery.CalculateBaseEntityIndexArrayAsync(Unity.Collections.AllocatorManager.AllocatorHandle%2cUnity.Jobs.JobHandle%2cUnity.Jobs.JobHandle%40)" data-throw-if-not-resolved="false"></xref> job to get an offset buffer.
     If you just want a sortkey for your <xref href="Unity.Entities.EntityCommandBuffer.ParallelWriter" data-throw-if-not-resolved="false"></xref> simply use <xref href="Unity.Entities.ChunkIndexInQuery" data-throw-if-not-resolved="false"></xref>
     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)