UMassBattleProjectileConfigDataAsset
Source/MassBattle/Public/DataAssets/MassBattleProjectileConfigDataAsset.h
概述 Overview
抛射物配置数据资产,派生自 UMassBattleDataAssetBase。承载抛射物的完整策划配置,按三块组织:Common(主/子类型、FProjectileParams 通用参数、事件参数、FProjectileSpawn 生成配置 —— Birth/Hit/Death 的 FX/音效)、Movement(运动模式 EProjectileMoveMode,默认 Ballistic,四组运动参数经 EditCondition 按模式互斥显示)、DamageAndDebuff(伤害模式 EProjectileDamageMode,默认 Radial,点/球/球扫三组伤害与 debuff 参数)。另含一组运行时 fragment(无 UPROPERTY,直接成员):FProjectileParamsRT、三种移动运行时、FLocating/FRotating/FScaling。运行时经 UMassBattleProjectileSubsystem::MakeProjectileTemplateFromDataAsset 组装进实体模板。PostLoad 执行版本门控的 ProjectileSpawn FX 配置迁移(1.20.1 / 1.20.2)。
Projectile configuration data asset, derived from UMassBattleDataAssetBase. Carries the complete designer configuration, organized in three blocks: Common (main/sub types, FProjectileParams general parameters, event parameters, FProjectileSpawn spawn config — FX/Sound on Birth/Hit/Death), Movement (movement mode EProjectileMoveMode, default Ballistic, four parameter groups mutually exclusive via EditCondition per mode), DamageAndDebuff (damage mode EProjectileDamageMode, default Radial, point/radial/beam damage and debuff parameters). Plus a group of runtime fragments (plain members, no UPROPERTY): FProjectileParamsRT, three movement runtimes, and FLocating/FRotating/FScaling. At runtime UMassBattleProjectileSubsystem::MakeProjectileTemplateFromDataAsset assembles it into the entity template. PostLoad runs version-gated ProjectileSpawn FX config migrations (1.20.1 / 1.20.2).
继承 Inheritance
公开方法 Public Methods
资产加载后的版本门控迁移:① DataVersion < 12001 时对 ProjectileSpawn 的 OnBirth / OnHit / OnRemoval 三处 SpawnFx 执行 MigrateFxConfigSubType(EESubType 枚举 → int32 SubType_Index),置版本 12001 并 MarkPackageDirty();② DataVersion < 12002 时对同样三处执行 MigrateFxConfigStyleType(EEStyleType 枚举 → int32 StyleType_Index),置版本 12002 并 MarkPackageDirty()。
Version-gated post-load migration: ① when DataVersion < 12001, runs MigrateFxConfigSubType (EESubType enum → int32 SubType_Index) on the three SpawnFx sites of ProjectileSpawn (OnBirth / OnHit / OnRemoval), sets version 12001 and calls MarkPackageDirty(); ② when DataVersion < 12002, runs MigrateFxConfigStyleType (EEStyleType enum → int32 StyleType_Index) on the same three sites, sets version 12002 and calls MarkPackageDirty().
Input
无参数。
No parameters.
Output
无返回值。副作用:按需迁移 FX 配置、推进 DataVersion、标记资产脏。
No return value. Side effects: migrates FX configs when needed, advances DataVersion, marks the asset dirty.
成员变量 Members
| 名称 Name | 类型 Type | 默认值 | 说明 Description |
|---|---|---|---|
Projectile | FProjectileTag | — | 主类型标签。Primary type tag. |
SubType | FSubType | — | 子类型 —— 框架当前并未使用这个值。SubType — the framework is not using it for anything currently. |
ProjectileParams | FProjectileParams | — | 通用参数。General parameters. |
ProjectileEvent | FProjectileEvent | — | 事件参数。Event parameters. |
ProjectileSpawn | FProjectileSpawn | — | 抛射物生成配置(Birth/Hit/Death 上的 FX/音效)。Projectile spawn configuration (FX/Sound on Birth/Hit/Death). |
MovementMode | EProjectileMoveMode | Ballistic | 抛射物运动模式,决定下方哪组运动参数可编辑。注意:组件同名字段默认值为 Static,两者默认值不同。Projectile movement mode, deciding which movement parameter group is editable. Note: the component's same-named field defaults to Static — the defaults differ. |
ProjectileMove_Ballistic | FProjectileMove_Ballistic | — | 抛物线运动参数(仅 MovementMode == Ballistic 时可编辑)。Ballistic movement parameters (editable only when MovementMode == Ballistic). |
ProjectileMove_Interped | FProjectileMove_Interped | — | 插值运动参数(仅 MovementMode == Interped 时可编辑)。Interpolated movement parameters (editable only when MovementMode == Interped). |
ProjectileMove_Tracking | FProjectileMove_Tracking | — | 追踪运动参数(仅 MovementMode == Tracking 时可编辑)。Tracking movement parameters (editable only when MovementMode == Tracking). |
ProjectileMove_Static | FProjectileMove_Static | — | 静止运动参数(仅 MovementMode == Static 时可编辑)。Static movement parameters (editable only when MovementMode == Static). |
DamageMode | EProjectileDamageMode | Radial | 抛射物伤害模式,决定下方哪组伤害/debuff 参数可编辑。Projectile damage mode, deciding which damage/debuff parameter group is editable. |
Damage_Point | FDamage_Point | — | 点伤害参数(仅 DamageMode == Point 时可编辑)。Point damage parameters (editable only when DamageMode == Point). |
Damage_Radial | FDamage_Radial | — | 球形伤害参数(仅 DamageMode == Radial 时可编辑)。Radial damage parameters (editable only when DamageMode == Radial). |
Damage_Beam | FDamage_Beam | — | 球扫伤害参数(仅 DamageMode == Beam 时可编辑)。Beam/Sweep damage parameters (editable only when DamageMode == Beam). |
Debuff_Point | FDebuff_Point | — | 点 debuff 参数(仅 DamageMode == Point 时可编辑)。Point debuff parameters (editable only when DamageMode == Point). |
Debuff_Radial | FDebuff_Radial | — | 球形 debuff 参数(仅 DamageMode == Radial 时可编辑)。Radial debuff parameters (editable only when DamageMode == Radial). |
Debuff_Beam | FDebuff_Beam | — | 球扫 debuff 参数(仅 DamageMode == Beam 时可编辑)。Beam/Sweep debuff parameters (editable only when DamageMode == Beam). |
ProjectileParamsRT | FProjectileParamsRT | — | 运行时参数(无 UPROPERTY)。Runtime params (no UPROPERTY). |
ProjectileMoving_Interped | FProjectileMoving_Interped | — | 插值运动运行时。Interped movement runtime. |
ProjectileMoving_Ballistic | FProjectileMoving_Ballistic | — | 抛物线运动运行时。Ballistic movement runtime. |
ProjectileMoving_Tracking | FProjectileMoving_Tracking | — | 追踪运动运行时。Tracking movement runtime. |
Locating | FLocating | — | 位置运行时。Location runtime. |
Rotating | FRotating | — | 旋转运行时。Rotation runtime. |
Scaling | FScaling | — | 缩放运行时。Scale runtime. |
管线角色 Pipeline Role
加载时 PostLoad 执行版本门控 FX 迁移;运行期由 UMassBattleProjectileSubsystem::MakeProjectileTemplateFromDataAsset 组装进实体模板,经 UMassBattleProjectileComponent::SpawnProjectileFromTemplate 按 MovementMode 分派到 SpawnProjectile_Static/Interped/Ballistic/Tracking_FromTemplate(本地路径)或 ProjectileComponent.Spawn 锁步指令(双端)生成。锁步指令载荷以数据资产路径引用本资产。
On load PostLoad runs the version-gated FX migrations; at runtime UMassBattleProjectileSubsystem::MakeProjectileTemplateFromDataAsset assembles it into the entity template, spawned via UMassBattleProjectileComponent::SpawnProjectileFromTemplate dispatching by MovementMode to SpawnProjectile_Static/Interped/Ballistic/Tracking_FromTemplate (local path) or the ProjectileComponent.Spawn lockstep command (both peers). Lockstep command payloads reference this asset by path.