[Video Tutorial) How to use Game Server Hosting (Multiplay)

Hey everyone!

I’ve been researching Game Server Hosting (Multiplay) and I made a video tutorial. There were a bunch of things that were pretty tricky to learn so hopefully this video is very helpful to someone!
Also covers how I made it work alongside Netcode for Game Objects

Hope you like it, thanks!

7 Likes

Thanks so much for putting this together!

Great video!

Quick question about SQP though. Did you manage to find how to correctly make it work? It seems like calling StartServerQueryHandlerAsync is not enough to actually start it. Even if you call UpdateServerCheck frequently, the server’s analytics do not actually fetch any data. Plus if your build configuration states that you are actually using SQP, the server will automatically shutdown after 2 minutes.

Did you assure that the Multiplay init has happened before?

                var initOptions = new InitializationOptions();
                initOptions.SetEnvironmentName("development");
                await UnityServices.InitializeAsync(initOptions);
                Debug.Log("Unity Multiplay SDK initialized.");

I also had my problems but they got solved as soon as I started using the UpdateServerCheck in the Update method. Make sure it’s your server logic running with that UpdateServerCheck method. Especially with the separation of Client & Server logic I often forget to make things executed on the server side.

What I miss on this video is how to deallocate a server properly. You are using
Multiplayer Hosting API (1.0) that is just for managing test allocations. I have a lot of problems using
Multiplayer Hosting Game API (1.0) to allocate/deallocate a productive (real) server because the API isn’t accepting any of my authorization headers. I recreated so many service accounts and also tried to use the token API. Nothing works for that API.