From 5b388d1f9661adbf98fa59e6ba0c751b3292933f Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Thu, 22 Aug 2024 17:26:06 -0400 Subject: [PATCH] ensure all playback systems happen after frame_counter --- src/input_playback.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/input_playback.rs b/src/input_playback.rs index b5291e2..4f1f275 100644 --- a/src/input_playback.rs +++ b/src/input_playback.rs @@ -40,13 +40,17 @@ impl Plugin for InputPlaybackPlugin { .add_event::() .add_systems( First, - (handle_end_playback_event, initiate_input_playback).chain(), + (handle_end_playback_event, initiate_input_playback) + .after(frame_counter) + .chain(), ) .add_systems( First, playback_timestamped_input - .run_if(resource_exists::) - .after(frame_counter) + .run_if( + resource_exists:: + .and_then(resource_exists::), + ) .after(initiate_input_playback), ); }