question

erikkubiak avatar image
erikkubiak asked

Unity - Disabling Server API key causes compile errors

Hello everyone :)

We are using Playfab in our project and we would like to disable the server api by unchecking "Disable server api". But when we do, we get compile error in PlayFabMultiplayerAgentView:

The name 'PlayFabMultiplayerAgentAPI' does not exist in the current context

So it comes from PlayFabMultiplayerAgentAPI being not compiled using a #if. We fixed this by also not compiling PlayFabMultiplayerAgentView.

Is it the right solution? If yes, do you think it may be fixed in next version?

Have anice day :)

3 comments
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

May I ask have you imported the GSDK? It looks strange that disabling Server API for a server build.

0 Likes 0 ·
erikkubiak avatar image erikkubiak commented ·

Yes, we are importing the GSDK. We use the same project to both build the clent and the server. That's why we want to do this.

0 Likes 0 ·
erikkubiak avatar image erikkubiak commented ·

We are using Mirror to handle network that's why we have the same project for both.

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

Your workaround looks fine. I don't think it can be reported as a bug, however, please feel free to send a thread on the Feature Request forum - https://community.playfab.com/spaces/24/index.html

1 comment
10 |1200

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

erikkubiak avatar image erikkubiak commented ·

Okey I will thank you :)

0 Likes 0 ·

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.