Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by ksw-test · 6 days ago · apisunity3dmultiplayer

Invalid input parameters RequestMultiplayerServer

I'm trying to use multiplayer by referring to some web pages.

In response to my code, Unity will Unity returned "Invalid input parameters" for my code.

But I don't know what's Invalid.

According to Debug.Log(error.ErrorDetails);, it seems to be System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.List`1[System.String]]

And the server request code I use is below.

This will be called when "LoginWithCustomID" is successful.

Thanks to you for reading and to the DeepL translation tool!

    private void RequestMultiplayerServer()
    {
        Debug.Log("[ClientStartUp].RequestMultiplayerServer");
        RequestMultiplayerServerRequest requestData = new RequestMultiplayerServerRequest();
        //requestData.BuildId = System.Guid.NewGuid().ToString();
        requestData.SessionId = System.Guid.NewGuid().ToString();
        requestData.PreferredRegions = new List<string>() { "EastUs" };
        //requestData.PreferredRegions = new List<AzureRegion>() { AzureRegion.EastUs };


        PlayFabMultiplayerAPI.RequestMultiplayerServer(requestData, OnRequestMultiplayerServer, OnRequestMultiplayerServerError);
    }

private void OnRequestMultiplayerServerError(PlayFabError error)
    {
        Debug.Log(error.ErrorMessage);
        Debug.Log(error.ErrorDetails);
    }


Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by Citrus Yan · 6 days ago

One of the following properties must be defined in the RequestMultiplayerServer request:

BuildId, or BuildAliasParams if you are using alias for your builds: https://docs.microsoft.com/zh-cn/rest/api/playfab/multiplayer/multiplayerserver/createbuildalias?view=playfab-rest.

Comment

People who like this

0 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ksw-test · 1 hour ago -1
Share

Thanks for the answer. I was able to successfully create an Alias using Postman and then get the IP address of the Server created with the API from Unity. The question I'm left with is whether this is the right way to go about it. https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/allocating-with-build-alias I have read the URL above, but do not fully understand Alias's reasoning. The first is lack of understanding. Does Playfab anticipate my approach described above? Should this Alias possibly be changed every time from Unity? Second, lack of understanding. Is Alias also needed when calling the Server from a non-client terminal? (e.g. Matchmaker). The third incomprehension I'm looking at Microsoft's Japanese documentation, but I can't figure out if Alias changes automatically or if it doesn't change unless I call the API.

Thanks to you for reading

avatar image Citrus Yan ♦ ksw-test · 1 hour ago 0
Share

Build alias is basically a management layer on top of serveral builds configured by you, which allows calls to RequestMultiplayerServer to be distributed over multiple builds in a controlled fashion. Alias won't change until you modify it, and yes, Alias is also needed (when you're using alias for your builds) when calling RequestMultiplayerServer from a non-client terminal.

avatar image ksw-test Citrus Yan ♦ · 5 secs ago 0
Share

With your help, I understood that this service assumes an API.

The aliases have been hidden in the browser until now, but they are an integral part of the server build?

Thanks for your infomation. I seem to have figured it out.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Unity Mirror and Playfab GameServers 1 Answer

    UserData object different between client and server? 1 Answer

    iOS Restore Purchase Receipt using Unity IAP 1 Answer

    Change default role in group to admin 1 Answer

    Unity+Mirror Cant connect to allocated gameserver, cant RDP either! 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges