SergioRibera / bevy_splash_screen

A plugin for bevy which allows you to create screens to show the brands and development teams behind your amazing game
https://crates.io/crates/bevy_splash_screen
Apache License 2.0
33 stars 6 forks source link

Crashes with Splash Screen and bevy_asset_loader #19

Open NoahShomette opened 6 months ago

NoahShomette commented 6 months ago

I am combining both this crate and bevy_asset_loader. However I am getting an occasional error where clicking too fast to skip will crash the game. I've traced this to the fact that the splash_skip function runs in any state and therefore when my app is in the loading state clicking will skip to the game state before its loaded and will cause systems to crash because the game hasnt been properly loaded.

Solution

If splash_skip is given a .run_if(in_state(self.state.clone())) then it should fix these issues and correctly only let the splash be skipped when its actually being run