I implemented an invite system in which players can invite their friends to the experience with their UserId as the LaunchData. The problem is, when that invited player joins the game, the LaunchData is simply an empty string.
The weird thing is, I have the exact same code in the test experience as the main published experience. In the test experience, the LaunchData successfully displays the UserId of the inviter, and the ensuing code works just fine. However, upon following the exact same steps in the live experience, it fails to display the UserId of the inviter.
Local code prompting the invites & setting the LaunchData:
PlayerAdded event, hosted on the server:
The output from the above code when a player joins the game after clicking the invite. The LaunchData is a blank string:
The exact same code’s output, but in the test experience. The LaunchData successfully displays the inviter’s UserId:
I’m not sure exactly what would be causing this. All of the settings in both experiences/places are the exact same, and the exact same code is being used. I even removed the InviteMessageId to see if that made a difference in either place, but got the same result. I’ve also looked up this issue and it seems like other developers are having similar issues.
We are also experiencing this issue and looking forward to a followup and eta on a fix for this thanks.
We have tried all options shown in the API examples and included code to wait for up to 10 seconds after a PlayerAdded event to look for LaunchData and it is not received.