amethyst / amethyst/editor-core

Tracking issue for serializing more engine types

Abierto
#18 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
45
Forks
8
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

The following components provided by Amethyst do not implement `Serialize`:

* [x] `UiTransform`
* [ ] `MeshData`
* [x] `UiText`
* [x] `Removal`
* [x] `UiButton`
* [x] `FlyControlTag`
* [ ] `Parent`

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

* [x] `HideCursor`

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:

* `MeshData` contains potentially large amounts of data, and therefor should not be serialized and sent every frame for performance purposes. I'm also not clear what exactly `MeshData` is used for? I'm more familiar with using `MeshHandle` for attaching meshes to entities. Is `MeshData` used for dynamically-generated meshes? We'll have to discuss it in more detail to determine how it should be handled, both in terms of serialization and how we should display it in the editor.
* `UiText` contains a good chunk of plain data that could be shown directly in the editor, but it also contains some private data that can't be (or at least shouldn't be) serialized (specifically the cached font handle, cached glyphs, and cached brush ID). There are potentially a few ways to solve this:
* ~Only implement `Serialize` and have it only serialize the data we care about. This is okay for now, but we do eventually want to be able to modify this data in the editor, which will require a `Deserialize` impl.~
* ~Split the cached data into a separate `UiTextCache` component.~
* Wait for #7 to be implemented so that we can use intermediate serialization to split off the data we don't want to serialize.
* `Parent` contains an `Entity`, which means it cannot be serialized directly. It is going to need #7 to be implemented in order to properly support serialization of `Entity` values.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.