Mass Battle Frameworkv1.20.0

MassBattleBaseStruct.h

USTRUCT ×4

Source/MassBattle/Public/Fragments/MassBattleBaseStruct.h

概述Overview

MassBattle 的四个基础标记类型,所有插件 fragment / tag / shared fragment 的派生根。对应 Mass Entity 的四种片段类别:Tag(无数据的存在标记)、Fragment(逐实体数据)、SharedFragment(原型内共享的可变数据)、ConstSharedFragment(共享的不可变数据)。派生类型以 FA_MassBattleBase* 为基类统一命名空间,便于识别与批量查询。

The four base marker types of MassBattle — the derivation root of every plugin fragment, tag and shared fragment. They map to the four Mass Entity fragment categories: Tag (existence marker without data), Fragment (per-entity data), SharedFragment (mutable data shared within an archetype) and ConstSharedFragment (shared immutable data). Deriving from FA_MassBattleBase* unifies the naming space and enables batch queries.

FA_MassBattleBaseTag USTRUCT

Tag 基类,派生自引擎的 FMassTag。无数据成员,用于标记实体类别或状态(如 FAgentTag、FNetworkTag)。

Tag base struct derived from the engine's FMassTag. No data members; used to mark entity category or state (e.g. FAgentTag, FNetworkTag).

FA_MassBattleBaseFragment USTRUCT

Fragment 基类,派生自引擎的 FMassFragment。逐实体数据载体,所有运行时/配置数据片段(如 FMove、FHealth)的派生根。

Fragment base struct derived from the engine's FMassFragment. The per-entity data carrier and the root of all data fragments (e.g. FMove, FHealth).

FA_MassBattleBaseSharedFragment USTRUCT

SharedFragment 基类,派生自引擎的 FMassSharedFragment。同一原型内所有实体共享一份的可变数据(如 FLODShared),按值去重。

SharedFragment base struct derived from the engine's FMassSharedFragment. Mutable data shared by all entities of the same archetype (e.g. FLODShared), deduplicated by value.

FA_MassBattleBaseConstSharedFragment USTRUCT

ConstSharedFragment 基类,派生自引擎的 FMassConstSharedFragment。共享且不可变的数据,引擎可跨 archetype 复用实例。

ConstSharedFragment base struct derived from the engine's FMassConstSharedFragment. Shared immutable data; the engine may reuse instances across archetypes.

管线角色Pipeline Role

本文件是纯类型定义,无运行时逻辑。作为派生根被全插件引用:几乎所有 Fragments/ 目录下的结构体都继承自这四个基类,使所有处理器查询能按基类宽泛匹配、按具体类型精确分派。处理器执行时由 Mass Entity Manager 按 archetype 组合自动管理这些片段的存储与生命周期。

This file is pure type definitions with no runtime logic. As the derivation root it is referenced plugin-wide: nearly every struct under Fragments/ inherits one of the four bases, so processor queries can match broadly by base type and dispatch precisely by concrete type. Storage and lifecycle of these fragments are managed automatically by the Mass Entity Manager per archetype composition at processor execution time.