question

Pat avatar image
Pat asked

PlayFabError

So I started a new project and when I brought in a script from a different project it said that it couldn't find PlayFabError. I imported the new SDK from github. The error says cannot convert from method group to ErrorCallback. Any idea what happen?

10 |1200

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

1807605288 avatar image
1807605288 answered

I have different advice now.

https://github.com/PlayFab/UnitySDK/blob/master/Source/Plugins/PlayFabShared/PlayFabErrors.cs

PlayFabErrors.cs existed in the Plugins folder because it was needed by our (now deprecated) PlayFab Custom Push Plugin. That is no longer the case.

My suggestion is to move PlayFabErrors.cs from the plugins folder to

PlayFabSdk/Shared/Internal/PlayFabErrors.cs

We will be doing the same with the release version of the SDK "soon". There were a lot of dominoes to clean up after the push plugin changed, and this was one of the minor ones.

On a related note, you can only do this if you delete the old PlayFab Custom Push Plugin (if you're using it), and replace your Push Notification solution with FCM.

10 |1200

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

1807605288 avatar image
1807605288 answered

Please verify that this file exists:
{YourUnityProject}\Assets\Plugins\PlayFabShared\PlayFabErrors.cs

This file is required for the sdk and the plugins we publish with the sdk.

If that file exists, and you are still having issues, please check your build settings. For Unity 5.x, you may be set to "Web Player". That build is deprecated by Unity and it can cause problems with our sdk. Set your build target to standalone, ios, or android, and this should resolve your issue.

If you're still seeing the issue, and you are not building a phone app, and you do not need push notifications or advertising, you can move thePlayFabErrors.cs file to: {YourUnityProject}\Assets\PlayFabSDK\Public\PlayFabErrors.cs, and delete your Plugins directory. This is NOT advised if you're building a phone app.

If none of these steps resolve the issue, please post again.

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.

Amar avatar image Amar commented ·

@Paul GilmoreI still have this issues on a new project I just created and I am building for iOS target. The App when compiled, still shows errors in Monodevelop. Maily in the PlayFabClientAPI.cs, it is not able to find the PlayFabError. Seems like that is the only file that is inside the plugins folder, and every thing else is in the PlayFab folder?

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ Amar commented ·

I'll need a handful of additional information to help with this issue:

* Unity Engine version (Help -> About Unity)

* PlayFab SDK version (This can be found in PlayFabSettings.cs)

* Have you updated your PlayFab SDK from an older version in this project?

In particular, this kind of issue can come up if you have installed the PlayFab SDK, and you copy-paste an updated version of the sdk overtop of a previous one. When updating, you should delete all PlayFab files, and reinstall them from scratch.

We are launching a beta tool for Unity which helps manage the SDK files. You can try it out here: https://github.com/PlayFab/UnityEditorExtensions

0 Likes 0 ·
madowlgamesuk avatar image madowlgamesuk 1807605288 ♦ commented ·

Im facing the same issue right now. Unity 2017.1.1f1 Sdk 2.28.170925

Installed trough the editor extension.

PlayFabErrors.cs is in Plugins\PlayFabShared

when i move it to {YourUnityProject}\Assets\PlayFabSDK\Public\PlayFabErrors.cs it works.

But the problem is it will be a phone app

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.