It emits a signal and passes from one scene to another. Whether with an AutoLoad or any node, change scenes and choose the transition that you like
Three shaders are included for transitions of type cut, pixelation and simple fade in/out. 12 different transitions so far.
To install this asset in your project you just have to:
Pass the shaders folder to the root of your project.
Move the cutoff_d folder to the "assets" folder within your project ".
Pass the "Transitions" folder into your "scenes" folder at the root of your project. If you require the "change_scene()" function, paste the "autoload" folder in the root of your project and add the scene as AutoLoad in the project settings.
How to use:
If in your main scene you have a node that instantiates the levels, called "Levels" or something similar, instantiate the scene that is in the "Transitions" folder in your main scene. The first property is to select the transition you want and the second property is to indicate the path of the node that instantiates scenes.
When your character enters the area of a door or something, it emits a signal to the root node of the level and this in turn will emit the information to its root node, which is the Game Node.
The "scene" parameter is something like this: "res: //scenes/levels/lvl_1.tscn"
In the Game node, the root of everything, there is a variable that directs us to the node we just instantiated for transitions.
If you have the scene of transitions like AutoLoad, simply add these lines every time you want to change the scene:
License: MIT .. ...
If you need more transitions you can comment, probably make updates constantly.
You can send an email to "contacto [ar] indielibre.com" if you need help implementing the asset in your project.
Thanks for comment. In the tests I did, I needed the instantiated scenes to have the Game node as owner, if I ran the _ready without having passed the owner before, I would have an error. _Ready is used in the transition to avoid errors if in the scene that instances you need the Game node.
I tried it on another computer and had the same problem, but I booted my desktop into Linux and was able to open it. My best guess is maybe the pipe ("|") in one of the folder names causes issues for Windows? Thanks for taking a look so fast!