Skip to content

Pull Data from Managed Layer

What

Exposable data from Managed Layer need to be in DOTS Compatible formats.

Why

So that DOTS Layer could pull these data using DOTS compatible code.

How

Singleton

Various config data in Managed Layer is made available to singleton entities.

ArmyFormationConfig formationConfig = SystemAPI.GetSingleton<ArmyFormationConfig>();

As Components

Some data is added as component of a config entity

UnitConfig unitConfig = SystemAPI.GetComponent<UnitConfig>(unitEntity);
private struct MyJob: IJobEntity {
    private void Execute(ref Hitpoint hitpoint, in UnitConfig unitConfig){
        hitpoint.Value += unitConfig.RegenSpeed;
    }
}

These data is made available by Bridge Layer

Via Baking

Singleton and Components data could be made available via Baking.

Via loading or initialisation

Provide utility methods that populate the World with Entities and Components. They are to be called from Managed Layer