docs.unity3d.com
    Show / Hide Table of Contents

    Method InitEntityQueryCache

    InitEntityQueryCache(Int32)

    Initializes this system's internal cache of EntityQuery objects to the specified number of queries.

    Declaration
    protected void InitEntityQueryCache(int cacheSize)
    Parameters
    Type Name Description
    Int32 cacheSize

    The initial capacity of the system's EntityQuery array.

    Remarks

    A system's entity query cache expands automatically as you add additional queries. However, initializing the cache to the correct size when you initialize a system is more efficient and avoids unnecessary, garbage-collected memory allocations.

    In This Article
    • InitEntityQueryCache(Int32)
    Back to top
    Terms of use
    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