Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load scene loads every object twice #342

Open
balloonpopper opened this issue Nov 13, 2024 · 0 comments
Open

Load scene loads every object twice #342

balloonpopper opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@balloonpopper
Copy link
Contributor

Bug description

If you step through the code after a "goto_room" call, the code will eventually get to this line in i_room.gd :

E.get_tree().change_scene_to_file(load(rp).scene)

If you step through that (F7 key) it will instantiate every item in your scene, one node at a time. What I've noticed though is that it instantiates twice as many nodes as you have in your scene.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create 2 simple rooms.
    a) Room 1 has a region or prop that runs an "R.goto_room()" command
    b) Room 2 has a walkable area and a prop for the background
  1. Put a breakpoint on the line in i_room.gd (~line 194)
  2. Run the game and step through (F7) that line. You will step through as the debugger instantiates room 2 twice, and the prop twice.

Expected vs observed behavior

Nodes should only instantiate once.

Environment information (please complete):

  • Windows 10
  • 4.4.dev3
  • Latest develop commit of Popochiu

Additional context

This might be a bug in this version of Godot. Haven't tested that yet - wanted to capture the bug first.

@balloonpopper balloonpopper added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant