Micro Bevy Splash
A simple, one-shot logo splash screen plugin for Bevy
Render a splash screen logo with optional tweening that will subsequently transition to another state when complete.
A basic use case for splash screens is to provide visual interest while loading assets. To achieve this, you can perform the following flow:
- Configure your game states such that you have one to trigger asset loading, one in which the splash screen should be shown, and one that shows a loading indicator if there are any remaining assets
- Preload your splash screen assets, and then trigger the loading of your other assets
- Specify
micro_bevy_splashto render in your splash state via the plugin settings, and transition to that state once loading has begun - Specify the loading screen state as the exit state for
micro_bevy_splashvia the plugin settings - In your loading state, check for any assets that haven't been loaded yet, and render a loading indicator for them - users may skip the splash screen, or loading might take longer than your splash duration, so you should assume that there will be some assets not fully loaded when transitioning away from the splash state
Usage
Include micro_bevy_splash in your project's Cargo.toml
[]
= "0.1.0"
and then configure the plugin for your app, including what state to render in, and what state to transition to.
The states can be any type that implements the States trait from bevy, but both states must be of the
same concrete type - typically an enum
use ;
// Import all of the usual bevy libraries here
Bevy Compatibility
| micro_bevy_splash | bevy |
|---|---|
| 0.1.0 | 0.13.x |