How to Pass Data when joining a lobby

Godot Version

Godot 4.3

Question

So I have a lobby scene
image
And I want to pass the Text from the “Name” LineEdit from this local game, to the game that the player is joining (which is hosted by another player using upnp)

Got it working using Singletons

Just made a new script and added it to “autoload”

The script just has a variable for player’s chosen display name
image

When player joins a lobby i set the variable to whatever the player typed
image

Then when i spawn the player on the host’s game i just set the label text
image

And sync it using MultiplayerSynchronizer

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.