Comments (4)
Hello, it seems like in your scenario, ready function is getting called so late so that the first scene is getting shown for a small time.
What I can suggest is that instead of running those three lines in _ready
function, run them in _tree_entered
and see if anything changes and it works as expected or not.
Keep me posted.
from scene_manager.
Thank you for answering. Unfortunately there is no _tree_entered
func, at least not in Godot 4. But I tried _enter_tree()
. With this I dont see any fade at all.
I found a workaround, though: Use ColorRect instead of Node, set its color to black and use the updated code:
extends ColorRect
func _enter_tree() -> void:
z_index = 100
func _ready() -> void:
await get_tree().create_timer(2).timeout
z_index = 0
var fadeIn = SceneManager.create_options(1, "fade", 0.1, false)
var options = SceneManager.create_general_options("black", 0.0, false, true)
SceneManager.show_first_scene(fadeIn, options)
from scene_manager.
Hi again, _enter_tree()
is exactly what I meant by that I just thought _tree_entered
was the name of it, sorry for my poor English. I just understood what I wrote and I'm laughing while typing this. XD
Anyway, Back to the problem, if you think this is ok and fixes your problem for now, good, but if you are interested in helping to find out what is the problem, you can provide me with a scenario which this behavior happens in it and I can check that project out and find out what is going wrong in the addon and fix it.
Inform me if you made a repository for this purpose.
from scene_manager.
No problem :) Was easy enough to find the function name with your hint 👍
To be honest, I think it's a godot problem. Because sometimes even the workaround doesn't work, sometimes it does.
So I will close here :)
from scene_manager.
Related Issues (17)
- consideration for stack size for newer versions after 2.0.1 HOT 4
- Exported Transitions Not working. HOT 3
- Crashing on Scene changes in build, but going into build and hitting Save fixes it? HOT 4
- Enhancement: C# HOT 1
- Deprecated parameter names in scene_manager.gdshader HOT 4
- Help with usage HOT 1
- "Scene Manager Error: loaded scene is not defined in scene manager tool." HOT 1
- Custom file for saved data HOT 7
- Callback methods? HOT 3
- [BUG] Popup Menu offset is wrong in a 21:9 monitor HOT 2
- [BUG] move demo scenes to another folder will break the project HOT 3
- Add open scene shortcut button HOT 2
- [Feature request] add a loading screen behavior configuration HOT 9
- [Bug] Possible threadlock when using load_scene_interactive() HOT 2
- Fade out, do something, fade in HOT 4
- Error "loaded scene is not defined" although scene is in ignore list HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scene_manager.