ECS concepts | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    ECS concepts

    If you are familiar with Entity-component-system (ECS) concepts, you might see the potential for naming conflicts with Unity's existing GameObject/Component setup.

    The purpose of this page is:

    1. Clarify and disambiguate the concepts as used in the ECS.
    2. Provide a brief introduction to each concept as an entry point to a new user.

    EntityManager

    Manages memory and structural changes.

    ComponentData

    Parallel streams of concrete, blittable data.

    e.g.

    Position HitPoints
    64,30 69
    58,55 70
    95,81 81

    See: General purpose components

    Entity

    An ID which can be used for indirect component lookups for the purposes of graph traversal.

    e.g.

    Entity Position HitPoints
    0 64,30 69
    1 58,55 70
    2 95,81 81

    See: Entities

    SharedComponentData

    Type of ComponentData where each unique value is only stored once. ComponentData streams are divided into subsets by each value of all SharedComponentData.

    e.g. (Mesh SharedComponentData)

    Mesh = RocketShip

    Position HitPoints
    64,30 69
    58,55 70
    95,81 81

    Mesh = Bullet

    Position HitPoints
    10,50 19
    36,24 38
    67,33 40

    See: Shared components

    Dynamic Buffers

    This is a type of component data that allows a variable-sized, "stretchy" buffer to be associated with an entity. Behaves as a component type that carries an internal capacity of a certain number of elements, but can allocate a heap memory block if the internal capacity is exhausted.

    See: Dynamic Buffers

    EntityArchetype

    Specific set of ComponentData types and SharedComponentData values which define the subsets of ComponentData streams stored in the EntityManager.

    e.g. In the above, there are two EntityArchetypes:

    1. Position, HitPoints, Mesh = RocketShip
    2. Position, HitPoints, Mesh = Bullet

    See: EntityArchetype in detail

    ComponentSystem

    Where gameplay/system logic/behavior occurs.

    See: ComponentSystem in detail

    World

    A unique EntityManager with specific instances of defined ComponentSystems. Multiple Worlds may exist and work on independent data sets.

    See: World in detail

    SystemStateComponentData

    A specific type of ComponentData which is not serialized or removed by default when an entity ID is deleted. Used for internal state and resource management inside a system. Allows you to manage construction and destruction of resources.

    See: SystemStateComponentData in detail

    JobComponentSystem

    A type of ComponentSystem where jobs are queued independently of the JobComponentSystem's update, in the background. Those jobs are guaranteed to be completed in the same order as the systems.

    See: JobComponentSystem in detail

    EntityCommandBuffer

    A list of structural changes to the data in an EntityManager for later completion. Structural changes are:

    1. Adding Component
    2. Removing Component
    3. Changing SharedComponent value

    See: EntityCommandBuffer in detail

    EntityCommandBufferSystem

    A type of ComponentSystem, which provides an EntityCommandBuffer. i.e. A specific (synchronization) point in the frame where that EntityCommandBuffer will be resolved.

    Back to top
    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