amethyst / amethyst/specs

Allow saveload to serialize/deserialize more than 8 component types

Offen
#414 13 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @andreivasiliu Auf GitHub ansehen
discussion enhancement
Vorherrschende Sprache
Rust
Sterne
2.6k
Forks
215
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.