How To Make My Non-Embeded Window Linked With The Rest Of My Scene?

Godot Version

4.5.1(stable)

Question

Simple-ish question, I have two separate windows; how could I have the windows both display the same scene without having to create a duplicate?
The windows is instanced on the same scene but I want it to link with the rest of the scene instead of just being an empty void.

I have a player, background and a play camera, I want the other window to display the nodes that it is siblings with (and preferably view it from the other camera). I have an immensely lackluster knowledge of subviewports and am promptly out of ideas.

What would I have to do to have my second window linked to the scene around it?

You could use a Subviewport texture

2 Likes

Both windows will need to share the same World2D You can do that by assigning your main Viewport.world_2d to the other Window

3 Likes

Both windows will need to share the same World2D You can do that by assigning your main Viewport.world_2d to the other Window

Thanks for the help this worked exactly how I wanted it!

extends Window

func _ready() -> void:
	self.world_2d = $"..".get_viewport().world_2d

Both windows are synced with one another!


Thank you very much!