From 1258ceb62cd8acb61f031dce128c2e04ee058538 Mon Sep 17 00:00:00 2001 From: mamekoro <86554319+mamekoro@users.noreply.github.com> Date: Mon, 16 Oct 2023 22:43:02 +0900 Subject: [PATCH] Change visibility of `bevy::core::update_frame_count` to `pub` (#10111) # Objective Closes #10107 The visibility of `bevy::core::update_frame_count` should be `pub` so it can be used in third-party code like this: ```rust impl Plugin for MyPlugin { fn build(&self, app: &mut App) { app.add_systems(Last, use_frame_count.before(bevy::core::update_frame_count)); } } ``` ## Solution Make `bevy::core::update_frame_count` public. --- ## Changelog ### Added - Documentation for `bevy::core::update_frame_count` ### Changed - Visibility of `bevy::core::update_frame_count` is now `pub` --- crates/bevy_core/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index e5682d3a92262..c222af6a9d9fe 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -154,7 +154,10 @@ impl Plugin for FrameCountPlugin { } } -fn update_frame_count(mut frame_count: ResMut) { +/// A system used to increment [`FrameCount`] with wrapping addition. +/// +/// See [`FrameCount`] for more details. +pub fn update_frame_count(mut frame_count: ResMut) { frame_count.0 = frame_count.0.wrapping_add(1); }