Yet Another Scene Manager's icon

Yet Another Scene Manager 1.0 Scripts 4.2 Community

Submitted by user BryceDixon; MIT; 2023-12-19

Add-on for Godot 4 which aids in loading scenes asynchronously (aka: in the background) which allows for animated/interactable loading screens and transition animations.

For full usage, see the [Readme](https://github.com/BtheDestroyer/Godot-YASM/blob/main/README.md)

This plugin comes with a default "loading" scene, but you can set your own by modifying the "application/scenes/loading_scene_path" Project Setting.


## Pre-load Signals

If you would like to `await` specific `Signal`(s) before switching to a scene after loading it, you can provide it/them in an optional `Array` to `YASM.load_scene(...)`

This is useful if you'd like to wait for all players to be ready in an online game or to allow the player to stay on the "loading" screen until they're ready.

## Transitions

Scene transitions are handled via Godot's `Animation`s on two `AnimationPlayers` within the `YASM` singleton.

## Available Signals

If you would like your code to react to different phases of loading a scene (eg: a multiplayer game would like to tell the server when a player is loaded), the following signals are available in `YASM`:

- `out_transition_done`: Emitted after the previous scene's "out" transition is done (or during `load_scene` if there is no "out" transition)

- `preload_done`: Emitted when resource loading is complete, but before all awaited signals are emitted or the new scene is instantiated

- `load_done`: Emitted after the new scene is instantiated

- `in_transition_done`: Emitted after the new scene's "in" transition is done (or immediately after `load_done` if there is no "in" transition set)

## Cancelling a Load

If something goes wrong while doing some manual work during the loading of a scene, you can call `YASM.cancel_scene_load()` (after optionally setting `YASM.last_error`) to immediately cancel loading the next scene and go to the "error" scene instead.


View files Download Submit an issue Recent Edits