question

did avatar image
did asked

[Unity] /Lobby/CreateLobby: Invalid input parameters Owner: The Owner field is required.

Hello,

I'm trying to create a lobby in Unity with this code:

PlayFabMultiplayerAPI.CreateLobby(new CreateLobbyRequest(), callback, FailureCallback);

My player is correctly logged in (`PlayFabClientAPI.IsClientLoggedIn()` and `PlayFabMultiplayerAPI.IsEntityLoggedIn()` both return true.

In the documentation it's said that "This value is implicitly the client or server entity who is creating the lobby.", but it seems it's not in my case.

Last thing I did was using `PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest(), OnEntityLoaded, FailureCallback);` to get a `PlayFab.ClientModels.EntityKey` which I converted to a `PlayFab.MultiplayerModels.EntityKey` like this:

clientEntityKey = result.AccountInfo.TitleInfo.TitlePlayerAccount; multiplayerEntityKey = new PlayFab.MultiplayerModels.EntityKey() { Id = clientEntityKey.Id, Type = clientEntityKey.Type };
It works, but this seems to ugly for me to be true.

Am I doing everything right?

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

To create a lobby, the Owner field is required. It means the lobby owner and must be the calling entity. For more information, please refer to Lobby - Create Lobby - REST API (PlayFab Multiplayer) | Microsoft Learn.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.