OwnerEntity.h
Source/MassBattle/Public/Fragments/OwnerEntity.h
概述 Overview
归属关系 fragment,记录「生成者」与「管理者」两个实体引用。用于宿主(host)实体与其来源实体之间建立引用,替代直接持有 Mass 句柄的碎片化读取,使下游处理器统一通过本片段追溯归属链。
Ownership fragment holding two entity references: the spawner and the manager. Used to link a host entity back to the entity that spawned it and the entity that manages it, replacing scattered raw handle reads so downstream processors trace ownership through this fragment uniformly.
FOwnerEntity USTRUCT
派生自 FA_MassBattleBaseFragment。两个成员均为 FEntityHandle(MassBattle 自定义实体句柄类型,定义于 MassBattleStructs.h),默认无效句柄。
Derived from FA_MassBattleBaseFragment. Both members are FEntityHandle (the custom MassBattle entity handle type defined in MassBattleStructs.h), defaulting to invalid handles.
成员变量 Members
| 名称 Name | 类型 Type | 默认值 | 说明 Description |
|---|---|---|---|
OwnerEntity | FEntityHandle | FEntityHandle() | 生成该 Actor 的 Agent。Agent that spawned this Actor. |
HostEntity | FEntityHandle | FEntityHandle() | 管理该 Actor 的 Entity。Entity that manages this Actor. |
管线角色 Pipeline Role
grep 验证:FOwnerEntity 在 MassBattleHostSubsystem.cpp 中被引用,宿主实体构建/复用时写入归属引用;宿主类实体(项目符号、战利品、特效宿主)经由它追溯生成者。
Verified by grep: FOwnerEntity is referenced in MassBattleHostSubsystem.cpp, where ownership references are written at host entity build/reuse; host-type entities (projectiles, loot, FX hosts) trace their spawner through it.