question

James McGhee avatar image
James McGhee asked

PlayFabMultiplayerAgentAPI server or client or both or neither?

Okay something off with your SDK, PlayFabMultiplayerAgentAPI is defined within a check on #if ENABLE_PLAYFABSERVER_API however its used in an object PlayFabMultiplayerAgentView which is not wrapped in any suchec define check ... and a lot of its funcitonality seems as if its intended for use on a client build.

So what gives?
Is this a server only API, is it meant for both, I really cant sort out what you intend with this.

For note this the Unity SDKs

unity3dmultiplayer
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

It’s the server only API. And for clarification, this API is only contained in the Unity GSDK. The only function of GSDK is to integrate the custom server and PlayFab Mutiplayer Server Service. It’s meaningless to use it on the client. Its usage is like the GSDK on this page -- https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/integrating-game-servers-with-gsdk.

Could you please clarify that why you said, “a lot of its functionality seems as if it intended for use on a client build.”? Is there any specific code snippet that makes you think so?

10 |1200

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

James McGhee avatar image
James McGhee answered

As noted your PlayFabMultiplayerAgentAPI is wrapped with script defines that insure it will only compile on a server ... however the PlayFabMultiplayerAgentView API is not wrapped in these defines so they do compile on client builds as your install and packages work at the moment.

Some of the functionality of the AgentView look like its inteded for use by the client ... hard to tell documentaiton is spotty at best. I think we cracked into this when we where looking at was it Party in Unity ... cant recall.

Point is just grabbing your packages as your documentation states means it will not compile a client build because AgentView compiles for client and references AgentAPI which does not compile for client

We fixed this in our build by I think it was wrapping AgentView up with "ENABLE_PLAYFABSERVER_API" also we gave up on working with Party as it seems its not yet ready for use in Unity

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.