Skip to content

Commit

Permalink
Make bevy_remote feature enable serialize feature (#17260)
Browse files Browse the repository at this point in the history
# Objective

`bevy_remote`'s reflection deserialization basically requires
`ReflectDeserialize` registrations in order to work correctly. In the
context of `bevy` (the library), this means that using `bevy_remote`
without using the `serialize` feature is a footgun, since
`#[reflect(Serialize)]` etc. are gated behind this feature.

The goal of this PR is to avoid this mistake by default.

## Solution

Make the `bevy_remote` feature enable the `serialize` feature, so that
it works as expected.

---

## Migration Guide

The `bevy_remote` feature of `bevy` now enables the `serialize` feature
automatically. If you wish to use `bevy_remote` without enabling the
`serialize` feature for Bevy subcrates, you must import `bevy_remote` on
its own.
  • Loading branch information
mweatherley authored Jan 10, 2025
1 parent 454dd27 commit a5279d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_internal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ meshlet_processor = ["bevy_pbr?/meshlet_processor"]
bevy_dev_tools = ["dep:bevy_dev_tools"]

# Enable support for the Bevy Remote Protocol
bevy_remote = ["dep:bevy_remote"]
bevy_remote = ["dep:bevy_remote", "serialize"]

# Provides picking functionality
bevy_picking = ["dep:bevy_picking"]
Expand Down

0 comments on commit a5279d3

Please sign in to comment.