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

54 lines
1.9 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: "OneFilePerActor"
type: concept
tags: ["unreal-engine", "collaboration", "version-control", "world-partition"]
sources: ["unreal-world-builder"]
last_updated: 2026-04-30
---
## Aliases
- OFPA
- One File Per Actor
- 单 Actor 单文件
- Per-Actor Asset 分块
## Definition
One File Per ActorOFPA是 Unreal Engine 5 World Partition 模式下的多用户协作编辑机制。每个 Actor 存储在独立文件中,而非整个关卡一个文件,从而支持多人同时编辑不同 Actor 而不产生源控制冲突。
## Problem Solved
传统关卡文件(所有 Actor 在一个 `.umap` 中)的协作问题:
- 两人同时打开同一关卡 → 文件冲突
- 某人保存后另一人保存 → 后者覆盖前者改动
- 锁定整个关卡才能安全编辑 → 串行化工作流程
## OFPA Workflow
1. 每个 Actor 存储为 `Path/To/Actor_Name/ActorName.uasset`
2. 多人可同时编辑不同 Actor无需锁定
3. 源控制按 Actor 粒度管理变更
4. 关卡文件仅存储 Actor 引用而非内容
## Team Education Requirements
必须教育团队:
- **签出方式**:按 Actor 单独签出,而非整个关卡
- **依赖理解**Actor 引用关系在关卡文件中,更改引用仍需操作关卡文件
- **命名规范**Actor 命名必须符合团队规范,避免歧义
## File Count Management
OFPA 启用后大规模关卡产生数千个 Actor 文件:
- 必须建立**文件数预算**
- 监控文件数增长趋势
- 构建关卡审计工具,标记尚未转换为 OFPA 的遗留关卡
## OFPA Limitations
- 大量 Actor 文件增加文件系统压力
- 某些第三方插件可能不完全兼容 OFPA
- 源控制仓库大小显著增加(更多小文件)
## Connections
- [[WorldPartition]] ← 协作模式 ← OneFilePerActor
- [[UnrealWorldBuilder]] ← 多用户支持 ← OneFilePerActor
- [[UnrealEngine5]] ← 核心引擎 ← OneFilePerActor
## Sources
- [[unreal-world-builder]]