For AI agents: the complete documentation index is available at /AchEngine/zh/llms.txt, the full documentation bundle is available at /AchEngine/zh/llms-full.txt, and this page is available as Markdown at /AchEngine/zh/usage/ecs/index.md.
当游戏数据已经建模为 Entity,并需要统一访问 World、CommandBuffer、Baker 或 DI 时使用。普通 UI 与场景流程继续使用常规 AchEngine 模块。
public class UnitBaker : Baker<UnitAuthoring>{ public override void Bake(UnitAuthoring authoring) { var entity = GetEntity(TransformUsageFlags.Dynamic); AddComponent(entity, new Health { Value = authoring.health }); }}builder.RegisterInstance(World.Default);