question

shlomi-atia avatar image
shlomi-atia asked

Does PlayFab work on Facebook platform in Unity?

Hi, I use playfab in my Unity project. And it works fine in Android and iOS platform. But when I switch platform to Facebook I have an error - "The type or namespace name 'ServerModels' does not exist in the namespace 'PlayFab' (are you missing an assembly reference?)". Does PlayFab work on Facebook platform in Unity?

apis
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.

shlomi-atia avatar image shlomi-atia commented ·

I solved the problem. Needs to enter ENABLE_PLAYFABSERVER_API in Scripting Define Symbols on Desktop and WebGL platform even you use Facebook Platform.

1 Like 1 ·

1 Answer

·
brendan avatar image
brendan answered

Yes, we have quite a lot of titles using Facebook with our Unity SDK. That particular error means that you're using Server API calls, but you haven't enabled the Server API in the project. There are options in the Editor Extensions for enabling each. But bear in mind that you should never ship a title that is using Server or Admin API calls, because you'd be exposing your Secret Key to everyone, which would allow a hacker to do anything he wanted to, to your title.

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.