You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain types in bevy_render, bevy_pbr, and bevy_sprite have trivial serde implementations but currently doesn't. Adding them can benefit developers of prefab crates.
The vibe regarding this in general is that rendering types should not be serialized. Hence why e.g. SerializedMesh exists.
Still, I think it's alright to implement them on these types. I certainly wouldn't veto it, though I wonder if using a serliaez impl on these types is pointing to underlying issues in the prefab impl
What does ExtendedMaterial do when its generics are not Serialize or Deserialize?
If we merge this, I would want to also conditionally #[cfg_attr(feature="serialize", reflect(Serialize, Deserialize))
The vibe regarding this in general is that rendering types should not be serialized. Hence why e.g. SerializedMesh exists.
Rendering types cannot be serialized because Handle exists. Types that doesn't contain Handle can be easily serialized. (We could do some thread local shenanigans but thats way out of scope for this.)
Still, I think it's alright to implement them on these types. I certainly wouldn't veto it, though I wonder if using a serliaez impl on these types is pointing to underlying issues in the prefab impl
It's more if the prefab crate want to express something like AlphaMode it doesn't have to add a custom type.
What does ExtendedMaterial do when its generics are not Serialize or Deserialize?
If we merge this, I would want to also conditionally #[cfg_attr(feature="serialize", reflect(Serialize, Deserialize))
Added Reflect impls, although for ExtendedMaterial I'm not sure since the type bounds do not match.
It's less about Handle and more about not wanting people to depend on the format of various render types like Mesh.
It's probably fine in this case? Pinging @tychedelia
@tychedelia do you remember if anything conclusion was reached?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A-RenderingDrawing game state to the screenD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesX-Needs-SMEThis type of work requires an SME to approve it.
6 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Certain types in
bevy_render,bevy_pbr, andbevy_spritehave trivial serde implementations but currently doesn't. Adding them can benefit developers of prefab crates.Solution
Added serde implementations for these types.
Testing
Cargo build with the serialize feature.