.. | ||
icon.png | ||
icon.png.import | ||
loading_scene.gd | ||
loading_scene.tscn | ||
plugin.cfg | ||
README.md | ||
resource_loader.gd | ||
scene_transition_manager.gd | ||
scene_transition_plugin.gd |
godot_scene_swap_plugin
Helps you change your scene gracefully!
How to use:
- Just download this repo (or get it from asset_lib)
- Activate plugin
- Use singleton "scene_manager" to load your scene like:
scene_manager.change_scene_to("res://demo/large_scene.tscn")
Check the results.
How it works:
- "change_scene_to" is called;
- Fade out (from loading_scene) is called;
- Once anim is finished (notified from signal animation_finished);
- Background thread is invoked;
- Current scene is released;
- New scene is loaded
- Progress is updated
- Once load is finished
- New scene is added to node three
- Once scene is ready (signal three_entered has been invoked), fade_in is called
- After fade_in is finished, loading_scene is hidden;
- Background thread is paused
Creating new transitions:
- Change/copy the included scene 'loading_scene.tscn';
- Create/change your animations;
- Keep emiting the signal animation_finished (with names fade_in or fade_out);
- Keep the methods fade_in and fade_out (plugin call these);
- Create/change the progress bar;
So far, only one loading scene is used, then, if you want to show more than one, changes on scene_transition_manager.gd is required