GUI Overlay Load

totorototoro Posts: 8Member

Hi, first post newbie...

I'm wondering about loading a scene, then using script loading a GUI scene on top each time, is this possible and how? Thanks

Doing a little research, would I use something like the following?
https://godotengine.org/qa/24773/how-to-load-and-change-scenes

Comments

  • MegalomaniakMegalomaniak Posts: 2,028Admin
    edited March 26

    Or are you asking about how to load a scene underneath a GUI/HUD?

  • totorototoro Posts: 8Member

    Thanks, I'll take a look at that too...

    Here's where I got:

    [code]

    # Add overlay GUI
    var next_level_resource = load("res://OverlayMenu.tscn")
    var next_level = next_level_resource.instance()
    root.add_child(next_level)
    
    print(next_level.name)
    print(get_path_to(next_level))
    
    var s_path = get_path_to(next_level)
    var o = get_node(s_path)
    #root.remove_child(o)
    o.queue_free()
    

    [/code]

  • totorototoro Posts: 8Member

    It's not really this, even though I suppose it could be actually!

    Either way, it's a better way of scene loading than I currently use, thanks

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file