You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,19 +8,15 @@ A tool to manage transition between different scenes.\
8
8
Scene Manager v1.X.X and v2.X.X is compatible with Godot 3.\
9
9
Scene Manager v3.X.X is compatible with Godot 4.
10
10
11
+
**Note**: Scene Manager v2.X.X and v1.X.X has heavily less features.
12
+
11
13
## Features
12
14
13
15
**Recently Added**:
14
16
15
-
*[X] Possibility to specify path scenes.db via Project/Settings (Just Godot4)
16
-
*[X] 5 new signals added:
17
-
- scene_changed
18
-
- fade_in_started
19
-
- fade_out_started
20
-
- fade_in_finished
21
-
- fade_out_finished
22
-
*[X] added a feature to navigate to the scene path in filesystem on godot when clicked on scene address in Scene Manager tool
23
-
*[X] added a feature to open a desired scene from Scene Manager tab
17
+
*[X] Added a feature to navigate to the scene path in filesystem on godot when clicked on scene address in Scene Manager tool
18
+
*[X] Added a feature to open a desired scene from Scene Manager tab
19
+
*[X] Users now can have some time to load their scene in the background with the new changing scene functionality
24
20
25
21
**All**:
26
22
@@ -48,7 +44,13 @@ Scene Manager v3.X.X is compatible with Godot 4.
48
44
*[X] sublist in lists of scene manager UI is now possible (Just Godot4)
49
45
*[X]`no_effect_change_scene` function added (Just Godot4)
50
46
*[X] Node can be added to `change_scene` and `no_effect_change_scene` functions (Just Godot4)
51
-
47
+
*[X] Possibility to specify path scenes.db via Project/Settings (Just Godot4)
48
+
*[X] 5 new signals added:
49
+
* scene_changed
50
+
* fade_in_started
51
+
* fade_out_started
52
+
* fade_in_finished
53
+
* fade_out_finished
52
54
53
55
## How To Use?
54
56
@@ -69,15 +71,15 @@ This is the tool that you will see on your right side of the godot editor after
69
71
<imgsrc="images/tool.png"/>
70
72
</p>
71
73
72
-
### Double key checker:
74
+
### Double key checker
73
75
74
76
If editing of a scene key causes at least two keys of another scene match, both of them will get red color and you have to fix the duplication, otherwise the plugin does not work properly as you expect it to work.
75
77
76
78
<palign="center">
77
79
<imgsrc="images/tool_double_key.png"/>
78
80
</p>
79
81
80
-
### Ignore Folder:
82
+
### Ignore Folder
81
83
82
84
Every folder that is added inside this section will be ignored and scenes inside them will not get included inside scenes categories section(the section above this section).
83
85
@@ -107,15 +109,15 @@ As it is visible on previous pictures, it is possible to add sublists in lists a
107
109
108
110
All you have to do is drag scenes by their buttons on the left and drop them on other sublists.
109
111
110
-
##Demo
112
+
# Demo
111
113
112
114
Just a simple demo to show some abilities of this addon:
113
115
114
116
<palign="center">
115
117
<imgsrc="./images/demo.gif"/>
116
118
</p>
117
119
118
-
###Demo Description
120
+
## Demo Description
119
121
120
122
1. Scene \<number\>: this button calls `change_scene` function and goes to next scene.
121
123
2. Reset: after pressing this button, you don't go back to the previous seen scenes by pressing back button but if you do, you actually restart your scene.
@@ -124,11 +126,11 @@ Just a simple demo to show some abilities of this addon:
124
126
5. Nothing: just shows a transition but actually does nothing.
125
127
6. Exit: after fading out of the screen, quits the game.
126
128
127
-
###Demo Code
129
+
## Demo Code
128
130
129
131
**Note**: You can use `SceneManager` node in your game after you activated `scene_manager` plugin.
130
132
131
-
Example:
133
+
### Simple Example Without any Loading Screen
132
134
133
135
```gdscript
134
136
extends Button
@@ -152,27 +154,31 @@ extends Button
152
154
@onready var general_options = SceneManager.create_general_options(color, timeout, clickable, add_to_back)
153
155
154
156
func _ready() -> void:
155
-
var fade_in_first_scene_options = SceneManager.create_options(1, "fade")
156
-
var first_scene_general_options = SceneManager.create_general_options(Color(0, 0, 0), 1, false)
### More Complex Example With Loading Screen for Scenarios That Scenes Need Some Time in Background
211
+
212
+
#### First Part
213
+
214
+
**Note**: This example is for someone who needs to generate a world in the background and then show the scene to the user or someone who generally needs to load some data in the background and then show the new scene to the user/player.
215
+
216
+
```gdscript
217
+
extends Control
218
+
219
+
# Nodes
220
+
@onready var progress: ProgressBar = find_child("Progress")
221
+
@onready var loading: AnimatedSprite2D = find_child("Loading")
Assume this part is in the new scene which needs some time in the background:
260
+
261
+
**Note**: This part emits the signal of `load_percent_changed` of SceneManager to inform the loading screen to change the percentage to inform user that something is happening.
262
+
**Note**: After the loading process is finished, `load_finished` will be called to inform the loading screen which everything is ready to change to the new scene.
1. load_finished => signal fires when interactively loading a scene finishes
209
293
2. load_percent_changed(value: int) => signal fires when interactively loading a scene progress percentage updates
@@ -213,9 +297,10 @@ func _on_next_button_up():
213
297
6. fade_in_finished => signal fires when fade in finishes
214
298
7. fade_out_finished => signal fires when fade out finishes
215
299
216
-
### Methods:
300
+
### Methods
217
301
218
302
This is the node you use inside your game code and it has these functions:
303
+
219
304
1.`validate_scene`(**key**: String) -> void:
220
305
* Checks and validates passed **key** in scenes keys. (breaks game if key doesn't exist in scenes keys)
221
306
2.`validate_pattern`(**key**: String) -> void:
@@ -249,7 +334,7 @@ This is the node you use inside your game code and it has these functions:
249
334
***timeout** = between this scene and next scene, there would be a gap which can take much longer that usual(default is 0) by your choice by changing this option.
250
335
***clickable** = makes the scene behind the transition visuals clickable or not.
251
336
***add_to_back** = if true, you can go back to current scene after changing scene to next scene by going to "back" scene which means previous scene.
* Call this method inside `_ready` function of a node with a script which that node is inside the first scene that game jumps into it and this causes to have a smooth transition into the first game scene.
254
339
* This function works just once at the beginning of the first game scene. After that, if you call this function again, nothing happens.
255
340
***fade_in_options** = creates it by calling `create_options` function.
@@ -261,9 +346,9 @@ This is the node you use inside your game code and it has these functions:
261
346
12.`set_back_limit`(**input**: int) -> void:
262
347
* Limits how much deep scene manager is allowed to record previous scenes which affects in changing scene to `back`(previous scene) functionality.
263
348
* Allowed `input` values:
264
-
1.input = -1 => unlimited (default)
265
-
2.input = 0 => we can not go back to any previous scenes
266
-
3.input > 0 => we can go back to `input` or less previous scenes
349
+
1. input = -1 => unlimited (default)
350
+
2. input = 0 => we can not go back to any previous scenes
351
+
3. input > 0 => we can go back to `input` or less previous scenes
267
352
13.`get_scene`(**key**: String) -> PackedScene:
268
353
* Returns PackedScene of passed scene key (blocking)
@@ -287,3 +372,9 @@ This is the node you use inside your game code and it has these functions:
287
372
* Records a scene key to be used for loading scenes to know where to go after getting loaded into loading scene or just for next scene to know where to go next.
288
373
22.`get_recorded_scene`() -> String:
289
374
* Returns recorded scene by `set_recorded_scene` function.
375
+
23.`add_loaded_scene_to_scene_tree`() -> void:
376
+
* Imports loaded scene into the scene tree but doesn't change the current scene
377
+
* Maily used when your new loaded scene has a loading phase when added to scene tree
378
+
* So to use this, first has to call `load_scene_interactive` to load your scene and then have to listen on `load_finished` signal and after the signal emits, you call this function and this function adds the loaded scene to the scene tree but exactly behind the current scene so that you still can not see the new scene
* when you added the loaded scene to the scene tree by `add_loaded_scene_to_scene_tree` function, you call this function after you are sure that the added scene to scene tree is completely ready and functional to change the active scene
0 commit comments