Steam
GD-Sync includes built-in Steam integration. If the GodotSteam plugin is installed, GD-Sync will automatically detect it and enable additional features.
When using Steam integration, ensure that GodotSteam is properly initialized before using any GD-Sync features that depend on it.
Joining Friends
Steam friends can seamlessly join each other when one of them is in a GD-Sync lobby. If a player is inside a lobby, it will be automatically detected by Steam. Their friends can then right-click the player’s name in Steam and select Join.
When the join button in Steam is pressed, GD-Sync emits the signal GDSync.steam_join_request(lobby_name : String, has_password : bool). You can use this signal to either join the lobby immediately if it has no password, or display a screen where the user can enter the password before joining.
Account Linking
GD-Sync accounts can be linked to Steam accounts. When linked, players can log into their GD-Sync account using their active Steam session, skipping the need to manually enter an email and password.
To link a Steam account, first log into the desired GD-Sync account. Once logged in, call GDSync.steam_link_account(). This returns a response code from ENUMS.LINK_STEAM_ACCOUNT_RESPONSE_CODE.
After linking, you can log in using GDSync.steam_login(valid_time : float). This works the same way as the normal login function, returning a response code from ENUMS.STEAM_LOGIN_RESPONSE_CODE.
To unlink a Steam account from a GD-Sync account, use GDSync.steam_unlink_account(). This returns a response code from ENUMS.UNLINK_STEAM_ACCOUNT_RESPONSE_CODE.