mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
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`
This commit is contained in:
parent
e23d7cf501
commit
1258ceb62c
1 changed files with 4 additions and 1 deletions
|
@ -154,7 +154,10 @@ impl Plugin for FrameCountPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
fn update_frame_count(mut frame_count: ResMut<FrameCount>) {
|
||||
/// A system used to increment [`FrameCount`] with wrapping addition.
|
||||
///
|
||||
/// See [`FrameCount`] for more details.
|
||||
pub fn update_frame_count(mut frame_count: ResMut<FrameCount>) {
|
||||
frame_count.0 = frame_count.0.wrapping_add(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue