Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #[reflect(Serialize, Deserialize)] and register more types #395

Merged
merged 5 commits into from
Jul 3, 2024

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Jul 3, 2024

Objective

Updated version of #351.

A lot of types are missing ReflectSerialize and ReflectDeserialize implementations with the serialize feature enabled, and several types are also not registered in the TypeRegistry.

Solution

Add #[cfg_attr(feature = "serialize", reflect(Serialize, Deserialize)] for types that were missing it, and register more types in the PhysicsTypeRegistrationPlugin. I also fixed and added some other derives, including removing Component from CoefficientCombine.


Migration Guide

CoefficientCombine is no longer a component. It was never supposed to be one, and did nothing on an entity anyways.

src/collision/collider/constructor.rs Outdated Show resolved Hide resolved
src/collision/collider/mod.rs Outdated Show resolved Hide resolved
src/collision/collider/mod.rs Outdated Show resolved Hide resolved
src/collision/collider/mod.rs Outdated Show resolved Hide resolved
src/collision/collider/mod.rs Outdated Show resolved Hide resolved
src/spatial_query/ray_caster.rs Outdated Show resolved Hide resolved
src/spatial_query/ray_caster.rs Show resolved Hide resolved
src/spatial_query/shape_caster.rs Outdated Show resolved Hide resolved
src/spatial_query/shape_caster.rs Outdated Show resolved Hide resolved
src/spatial_query/shape_caster.rs Show resolved Hide resolved
Jondolf and others added 4 commits July 3, 2024 15:48
Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
@Jondolf Jondolf merged commit cb920f1 into avian Jul 3, 2024
4 checks passed
@Jondolf Jondolf deleted the derive-reflect-serialize branch July 3, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants