no funciona esto en unity 6 Multiplayer Service 1.1.1
Esto dice la pagina Oficial de Unity en esta parte Create a lobby with player data for the host (Create a lobby)
CreateLobbyOptions options = new CreateLobbyOptions();
// Ensure you sign-in before calling Authentication Instance.
// See IAuthenticationService interface.
options.Player = new Player(
id: AuthenticationService.Instance.PlayerId,
data: new Dictionary<string, PlayerDataObject>()
{
{
"ExampleMemberPlayerData", new PlayerDataObject(
visibility: PlayerDataObject.VisibilityOptions.Member, // Visible only to members of the lobby.
value: "ExampleMemberPlayerData")
}
});
Lobby lobby = await LobbyService.Instance.CreateLobbyAsync(lobbyName, maxPlayers, options);
Asi que lo copie y pegue en mi IDE Visual Studio 2022 y obtengo error aqui en el ID que dice
//CS1739: La mejor sobrecarga para Player no tiene un parametro denominado id
//UNT0010: Component Player Should not be instantiated directly
sera que los ejemplos de Unity estan desactualizados?