From a06802a66eb0af8c2d2c4ec77a654a5ed5913596 Mon Sep 17 00:00:00 2001 From: Matty Date: Thu, 10 Oct 2024 14:51:17 -0400 Subject: [PATCH] Make `AnimatableCurve::curve` public (#15831) # Objective The other `Curve -> AnimationCurve` wrappers allow public access to the inner curve, so this one should as well. ## Solution Made the field public. Instances will still need to be constructed using the (more ergonomic) `from_curve` method, which infers the phantom type for the user. --- crates/bevy_animation/src/animation_curves.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/bevy_animation/src/animation_curves.rs b/crates/bevy_animation/src/animation_curves.rs index 2ca23727b57f9..14ee7f24fc8f8 100644 --- a/crates/bevy_animation/src/animation_curves.rs +++ b/crates/bevy_animation/src/animation_curves.rs @@ -187,7 +187,10 @@ impl AnimationCompatibleCurve for C where C: Curve + Debug + Clone + #[derive(Reflect, FromReflect)] #[reflect(from_reflect = false)] pub struct AnimatableCurve { - curve: C, + /// The inner [curve] whose values are used to animate the property. + /// + /// [curve]: Curve + pub curve: C, #[reflect(ignore)] _phantom: PhantomData

, }