When launching multiple game instances, which one has its scene tree displayed in the editor?
When i'm running more than one instance of the game, is there any quick way to tell which instance of the game is the one that gets its scene tree displayed under "Remote" in the editors scene tab?.
2 replies
It's the "first" instance that opens - on my machine it corresponds to the window order in the taskbar. The feature to configure the started instances with parameters is not yet merged into Godot 4 but I think for 3 there's an addon in the asset library to give your started instances some parameters to help you identify them.
If you just want to quickly see which window you have in the "remote" tree view, I'd suggest a quick and dirty autoload script like this:
Put it at the end of the autoload queue and it will create a top level node with a random-number as the name and also put that name in the window title. Note that this is for Godot 4.
Alternatively if you don't want to write the number into the window's title you can also get the
nameproperty of the autoload and write in in a label somewhere in your UI.Wow thanks for the quick and detailed answer :D. Ive used a variation of the autoload script you provided and it works great.
(I actually went back and checked now that i can easily tell which one it is and it appears like it is often, but not always, the one last in my taskbar (out of 3 open instances). ~30%-50% of the time it can also be the second to last one and i recall it even being the first one in the taskbar at least once)