question

Trevor Godley avatar image
Trevor Godley asked

Just updated to Unity version 2021.1.18f1, how do you resolve the error with Playfab GSDK "The type or namespace name 'MultiplayerAgentAPI' does not exist in the namespace 'PlayFab'"

Just updated my project to newest version of unity, but now I'm having trouble integrating the GSDK. For some reason the project can't seem to find the namespace MultiplayerAgentAPI, despite the fact that I re-imported it using PlayFabMultiplayerSDK.unitypackage in the latest GSDK download. 02092021-154108-rec.png

I have ENABLE_PLAYFABSERVER_API in my build settings, although it looks slightly different than in previous unity versions: 02092021-153409-rec.png

Does anyone have any ideas how to resolve this error?

unity3d
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

·
JayZuo avatar image
JayZuo answered

There is no "MultiplayerAgentAPI" namespace in Unity GSDK. What you should use is

using PlayFab.MultiplayerAgent.Model;

not

using PlayFab.MultiplayerAgentAPI.Model;

See gsdk/MultiplayerGameServer.cs at master PlayFab/gsdk (github.com).

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.