This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
Jessist/addons/scene_transition
2022-06-18 13:05:48 +02:00
..
icon.png Initial commit 2022-06-18 13:05:48 +02:00
icon.png.import Initial commit 2022-06-18 13:05:48 +02:00
loading_scene.gd Initial commit 2022-06-18 13:05:48 +02:00
loading_scene.tscn Initial commit 2022-06-18 13:05:48 +02:00
plugin.cfg Initial commit 2022-06-18 13:05:48 +02:00
README.md Initial commit 2022-06-18 13:05:48 +02:00
resource_loader.gd Initial commit 2022-06-18 13:05:48 +02:00
scene_transition_manager.gd Initial commit 2022-06-18 13:05:48 +02:00
scene_transition_plugin.gd Initial commit 2022-06-18 13:05:48 +02:00

godot_scene_swap_plugin

Helps you change your scene gracefully!

How to use:

  1. Just download this repo (or get it from asset_lib)
  2. Activate plugin
  3. 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:

  1. "change_scene_to" is called;
  2. Fade out (from loading_scene) is called;
  3. Once anim is finished (notified from signal animation_finished);
  4. Background thread is invoked;
  5. Current scene is released;
  6. New scene is loaded
  7. Progress is updated
  8. Once load is finished
  9. New scene is added to node three
  10. Once scene is ready (signal three_entered has been invoked), fade_in is called
  11. After fade_in is finished, loading_scene is hidden;
  12. Background thread is paused

Creating new transitions:

  1. Change/copy the included scene 'loading_scene.tscn';
  2. Create/change your animations;
  3. Keep emiting the signal animation_finished (with names fade_in or fade_out);
  4. Keep the methods fade_in and fade_out (plugin call these);
  5. 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