修复 PIE 快照丢相机组件(序列化写出键 Attached ≠ 读侧 Camera)与子弹同帧多接触重复特效(Bullet 命中防重入)

This commit is contained in:
2026-10-08 23:06:18 +08:00
parent 21da38db92
commit d4d37b4b28
2 changed files with 11 additions and 1 deletions
+4 -1
View File
@@ -440,7 +440,10 @@ namespace Engine::Serialization {
}
if (const auto* c = reg.try_get<ECS::CameraComponent>(e)) {
out << YAML::Key << "Attached" << YAML::Value
// 键名 = "Camera"(与读侧 731 行对称;曾误写 "Attached"
// 导致 PIE 快照恢复丢相机组件——磁盘场景手写 YAML 键名
// Camera 才一直没暴露)
out << YAML::Key << "Camera" << YAML::Value
<< YAML::BeginMap;
out << YAML::Key << "Primary" << YAML::Value << c->primary;
out << YAML::Key << "Active" << YAML::Value << c->active;