Releases: glass-brick/Scene-Manager
v1.1.1
v1.1.0
v1.0.1
v1.0.0: The one for Godot 4
Godot 4 is finally oficially out! This calls for a bump on our major release, a change on our main branch, and a new feature that was previously impossible to implement in Godot 3:
Callbacks
Since GDScript now supports Callables, we can easily send functions as parameters in our transition options. This allows a pretty useful pattern to be easily implemented: Callbacks.
If you want some snippet of code to run at specific moments of a transition, you can send it inside of a callable like so:
SceneManager.change_scene("res://demo/test2.tscn", {
"on_tree_enter": func(scene): print("wow I just entered the tree!")
})
This is somewhat similar to how you could use Signals before, but the main advantage is that you can execute code declared in nodes that are already unmounted.
There are 4 currently available callbacks:
- "on_tree_enter": called when the new scene enters the tree
- "on_ready": called when the new scene is ready
- "on_fade_out": called when the fade_out is complete (screen is completely black)
- "on_fade_in": called when the fade_in is complete (transition is completely finished)
v0.5.1: AssetLib compliance
Should make it easier to download only what you need from assetlib
v0.5: Custom Animations
Now you can add your very own AnimationPlayer
to complement the one packaged in SceneManager!
First off, setup a new Scene
that has an AnimationPlayer
as its root node. Make and name all the animations you want, and make sure you have a RESET
animation that keeps all your visuals out of the screen.
Then, set your player in SceneManager via code (We recommend doing this as early as possible in your game. For example in the _ready()
method of an autoload or your first scene):
SceneManager.set_animation_player('res://demo/animation_player.tscn')
Now, whenever you call SceneManager.change_scene()
or any other transition function, you will be able to add new animation_name
, animation_name_enter
and/or animation_name_leave
options with the name of your animation.
Check the README for more info!
v0.4.2
v0.4.1
v0.4: Independent fade_in/fade_out
Completed enhancements proposed in #12
New API methods:
- fade_out(options)
- fade_in(options)
These new methods allow you to do half of a regular transition with the same options as change_scene()
New options:
- skip_fade_out : Bool
- skip_fade_in : Bool
You can set these totrue
to skip parts of a transition
General internal rewrites, new deprecation warnings:
- you should replace the "no_scene_change" option for "skip_scene_change"
- you should remove the "type" option and
FadeTypes
enum entirely. For normal fade transitions, use "pattern": "fade" (this is the new default pattern)