docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct OmitLinkedEntityGroupFromPrefabInstance

    The presence of this component instructs EntityManager.Instantiate to not to create the LinkedEntityGroup buffer component for every prefab instance, and the prefab child entities are still created. This component is not kept on the instantiated entities afterwards. This component is completely ignored and treated as a regular tag component when LinkedEntityGroup is not present on the source prefab entity.

    Implements
    IComponentData
    IQueryTypeParameter
    Namespace: Unity.Entities
    Assembly: Unity.Entities.dll
    Syntax
    public struct OmitLinkedEntityGroupFromPrefabInstance : IComponentData, IQueryTypeParameter
    Remarks

    The use of this component is likely for performance consideration, because creating buffer components is an expensive process involving heap memory allocations linear to the number of instances being instantiated. Omitting the LinkedEntityGroup could make it difficult to associate the children entities with their prefab roots; in such case components with Entity reference like Unity.Transforms.Parent could be useful.

    Implements

    IComponentData
    IQueryTypeParameter
    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)