amethyst / amethyst/editor-core

Tracking issue for serializing more engine types

Offen
#18 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
45
Forks
8
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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