amethyst / editor-core

Crate that allows an Amethyst game to communicate with an editor.
Other
44 stars 10 forks source link

Tracking issue for serializing more engine types #18

Open randomPoison opened 6 years ago

randomPoison commented 6 years ago

Originally brought up by @jojolepro in randomPoison/amethyst-editor#29.

The following components provided by Amethyst do not implement Serialize:

And the following resources provided by Amethyst do not implement Serialize:

I'm making a PR to Amethyst adding missing Serialize impls to any types that only contain simple data. The following types are more complex and will need special handling:

AnneKitsune commented 6 years ago
#[serde(skip)]

I don't think UiText will be deserializable any time soon though, as it requires the runtime handles.

What is deserializable though is the UiText prefab :D

randomPoison commented 6 years ago

Ah, looks like UiText also has a non-private field font that is a FontHandle, so it's not going to be enough to simply skip the private fields. Looks like it's going to need to wait for #7.

AnneKitsune commented 6 years ago

You can skip the font handle for the serialization though

randomPoison commented 6 years ago

amethyst/amethyst#1003 adds serialization support for a number of new components and resources. These should be added to the list of default types (being added in #21) once Amethyst 0.9 is released.