docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class InternalBufferCapacityAttribute

    Specifies the maximum number of elements to store inside a chunk.

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

    Use this attribute on the declaration of your IBufferElementData subtype:

    [InternalBufferCapacity(10)]
    public struct FloatBufferElement : IBufferElementData
    {
        public float Value;
    }

    All DynamicBuffer<T> with this type of element store the specified number of elements inside the chunk along with other component types in the same archetype. When the number of elements in the buffer exceeds this limit, the entire buffer is moved outside the chunk.

    DefaultBufferCapacityNumerator defines the default number of elements.

    Constructors

    Name Description
    InternalBufferCapacityAttribute(int)

    The number of elements stored inside the chunk.

    Fields

    Name Description
    Capacity

    The number of elements stored inside the chunk.

    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)