Unity-Technologies/com.unity.multiplayer.samples.coop

Lobby not working on latest LTS

neubern opened this issue · 5 comments

Hello,
I'm getting the following Error when trying to use the Lobby in the Boss Room Example:
Unity Gaming Services ProjectID not set up. Click the Readme file in the Assets Folder within the Project window in-editor to follow "How to set up Unity Gaming Services"

I've followed the instructions in the Readme, set the Project ID together in correlation with the Dashboard and enabled both Services.
I've also tried the sample "LobbyHelloWorld" and I get Heartbeets from the Lobby connection.
I'm using the latest LTS version of Unity btw.

Thank you!

When you hit play, what do your project settings for services look like? Can you send a screenshot?
Also does your editor show you're logged in?

haln commented

Seems like the created profile ID when using the editor results in a 32 character profile ID, but it fails a regex check with a 30 character limit. No errors or exceptions indicate this, making it seem like the ProjectID is not set up because the note is always there when signing in fails.

This is with Unity 2021.3.19f1, which is the latest LTS version at the moment I believe.

Quick, dirty fix for anybody just trying to get past this issue and ended up here, open up ClientMainMenuState.cs and just change one line in TrySignIn() from
var profile = m_ProfileManager.Profile;
to
var profile = m_ProfileManager.Profile.Substring(0, 30);

The above command has solved the Issue :D
Thank you so much!

Im also having this same issue (Unity 2021.3.2f1), the substring code fixed it for me as well

Indeed, this 30 character limit was added in a recent version of the Authentication package, and when updating to a new editor version, the package is automatically updated as well.
PR #831 fixes this issue