Files
nexus/wiki/concepts/Mass-Entity.md
2026-05-03 05:42:12 +08:00

42 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Mass Entity"
type: concept
tags: ["unreal-engine", "ecs", "simulation", "crowd", "performance"]
sources: ["unreal-systems-engineer"]
last_updated: 2026-05-30
---
## Aliases
- Unreal Entity Component System
- Mass Framework
- UE5 ECS
## 定义
Mass Entity 是 Unreal Engine 的 ECSEntity Component System实现通过 `UMassEntitySubsystem` 处理海量 NPC、投射物或人群代理的模拟以原生 CPU 性能运行。
## 核心架构
### FMassFragment数据组件
每个实体的数据层——存储 per-entity 数据(如位置、速度、生命值)。
### FMassTag标记组件
布尔标记——用于标识实体类型或状态(如 `FMassCharacterLargeLODTag`)。
### Mass Processors
操作 fragments 的并行处理器——使用 Unreal 任务图并行执行。
### UMassRepresentationSubsystem
连接 Mass 模拟和 Actor 可视化的桥梁:
- 将 Mass 实体显示为 LOD 切换的 ActorHierarchical LOD
- 或显示为 Instance Static MeshISM以优化渲染
## 使用场景
- 海量 NPC 群体模拟
- 密集投射物系统
- 人群代理
- 任何需要处理成千上万实体的性能敏感场景
## 相关概念
- [[Actor Replication]] — Mass 实体与网络复制的关系
- [[UnrealEngine5]] — Mass Entity 是 UE5 内置框架