Skip to content

Commit eb62d2f

Browse files
authored
Make Broadphase Serializable to Json (#899)
1 parent ef5dcac commit eb62d2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/geometry/broad_phase_bvh.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ pub struct BroadPhaseBvh {
2020
pub(crate) tree: Bvh,
2121
#[cfg_attr(feature = "serde-serialize", serde(skip))]
2222
workspace: BvhWorkspace,
23+
#[cfg_attr(
24+
feature = "serde-serialize",
25+
serde(
26+
serialize_with = "crate::utils::serde::serialize_to_vec_tuple",
27+
deserialize_with = "crate::utils::serde::deserialize_from_vec_tuple"
28+
)
29+
)]
2330
pairs: HashMap<(ColliderHandle, ColliderHandle), u32>,
2431
frame_index: u32,
2532
optimization_strategy: BvhOptimizationStrategy,

0 commit comments

Comments
 (0)