Godot Editor Scene Tree Doesn't Update in Playmode?

Godot v4.2.2 .NET (C#)

Question

I’m wondering if the scene tree view is supposed to update when I test my game with F5/F6 (“entering playmode” in Unity speak)?

For example, I wrote the following to test deleting another Node in the scene after 6 seconds, and I confirmed it deletes the other Node (cause I set a different C# script to it, and its _ExitTree() method got called, and stopped making subsequent calls to _Process(double delta)).

However, the scene tree view in my Godot editor still/always shows both Nodes as if nothing was deleted. I’m mostly wondering cause it’d be nice to see the Godot editor show a realtime preview of what objects are in the currently-running scene when in playmode. Is this intended behavior?

Here’s my basic test code:

using System.Threading.Tasks;
using Godot;

public partial class DeleteTester : Node {
    [Export] private float startDelay = 6;
    [Export] private Node target;

    public override void _EnterTree() {
        if (target == null) {
            GD.PrintErr("No target selected to delete.");
            return;
        }
        _ = DeleteAfterDelay(startDelay);
    }

    private async Task DeleteAfterDelay(float delay) {
        await Task.Delay((int) (delay * 1000));
        target.QueueFree();
    }
}

(Note that even in playmode, the “Target” Node never disappears. And yes, I’ve confirmed it works! No errors in the console nor debugger)
image

Its the remote tab you want, not very obvious I know.

You can set it in the project settings so it goes to Remote when a project is run by default.

1 Like

obraz

1 Like

Ooh awesome, thanks both!
Would mark both as the answer if I could

1 Like