Search Unity

Question related to Unity Samples (Hello Cube), regarding - System Update Order

Discussion in 'Entity Component System' started by Haneferd, Apr 19, 2021.

  1. Haneferd

    Haneferd

    Joined:
    Feb 3, 2018
    Posts:
    36
    I have a small question to one of the ECS Samples on Github from Unity;

    I have noticed in the documentation for Entities 0.17.0-preview.41 "System Update Order" ,
    that the default system group: "InitializationSystemGroup ", has the pre-defined member:
    "BeginInitializationEntityCommandBufferSystem".

    But in one of the examples for spawning
    ("HelloCube/5. SpawnFromEntity/SpawnerSystem_FromEntity.cs /"), I see that the system for spawning
    is set to be a member of another group: "SimulationSystemGroup" (Which also are the default group according to documentation).

    What is the reason for that? Why does it not put the spawner system in "InitializationSystemGroup"

    The code snippet from Unity-Example:

    Code (CSharp):
    1. [UpdateInGroup(typeof(SimulationSystemGroup))]  
    2. public partial class SpawnerSystem_FromEntity : SystemBase
    3. {
    4.     BeginInitializationEntityCommandBufferSystem m_EntityCommandBufferSystem;
    5.  
    6.     ....