Skip to content

Commit babeb2b

Browse files
committed
Rename despawn_recursive into despawn
Bevy deprecated `despawn_recursive` and this function calls `despawn`, but has the old name.
1 parent e1bcd58 commit babeb2b

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Rename `replication_registry::despawn_recursive` into `replication_registry::despawn`.
13+
1014
## [0.33.0] - 2025-04-27
1115

1216
### Changed

src/shared/replication/replication_registry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rule_fns::{RuleFns, UntypedRuleFns};
1818
pub struct ReplicationRegistry {
1919
/// Custom function to handle entity despawning.
2020
///
21-
/// By default uses [`despawn_recursive`].
21+
/// By default uses [`despawn`].
2222
/// Useful if you need to intercept despawns and handle them in a special way.
2323
pub despawn: DespawnFn,
2424

@@ -153,7 +153,7 @@ impl ReplicationRegistry {
153153
impl Default for ReplicationRegistry {
154154
fn default() -> Self {
155155
Self {
156-
despawn: despawn_recursive,
156+
despawn,
157157
components: Default::default(),
158158
rules: Default::default(),
159159
marker_slots: 0,
@@ -171,7 +171,7 @@ pub struct FnsId(usize);
171171
pub type DespawnFn = fn(&DespawnCtx, EntityWorldMut);
172172

173173
/// Default entity despawn function.
174-
pub fn despawn_recursive(_ctx: &DespawnCtx, entity: EntityWorldMut) {
174+
pub fn despawn(_ctx: &DespawnCtx, entity: EntityWorldMut) {
175175
entity.despawn();
176176
}
177177

0 commit comments

Comments
 (0)