Skip to content

serde Serialize and Deserialise on shape types #10626

@ActuallyHappening

Description

@ActuallyHappening

What problem does this solve or what need does it fill?

I am wanting ot efficiently sync data between server and client. Since Mesh is not (and should not) implement serialise, I am using a custom enum. I wanted this enum to have variants like Prism(shape::Box) but I found out shape::Box doesn't implement serialise and deserialise.

What solution would you like?

#[cfg_attr("serialize-serde", derive(Serialize, Deserialize)] on all of the shapes

What alternative(s) have you considered?

Currently I can manually store the underlying types

Additional context

Thanks so much for bevy! Its awesome to have fun with :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possibleD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions