GithubHelp home page GithubHelp logo

Comments (4)

maktoobgar avatar maktoobgar commented on June 8, 2024

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.

NickHatBoecker avatar NickHatBoecker commented on June 8, 2024

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.

maktoobgar avatar maktoobgar commented on June 8, 2024

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.

NickHatBoecker avatar NickHatBoecker commented on June 8, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.