amethyst / amethyst/specs

Allow saveload to serialize/deserialize more than 8 component types

未关闭
#414 13 条评论 0 个 reaction 已指派 1 人 已被 @andreivasiliu 认领 在 GitHub 查看
discussion enhancement
主要语言
Rust
星标
2.6k
派生
215
PR 合并指标
30 天内没有已合并 PR

描述

I'm not sure if I'm doing something horribly wrong or commendably right, but I've hit the size limit of tuples that implement the `SerializeComponents`/`DeserializeComponents` traits, which is currently 8 component types.

This will not compile:
```
SerializeComponents::::serialize(
&(positions, sizes, shapes, rooms, in_rooms, player_controllers, velocities,
forces, aims, collision_sets, revolute_joints, jumps, animations),
&entities,
&markers,
&mut serializer
)
```

I think the proper solution here would be to implement `SerializeComponents` for any structure with `#[derive(SystemData)]`, but I don't know enough Rust to figure out how to do it myself.

Short-term I'd be happy with increasing the tuple size limit too.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。