question

timpson-63 avatar image
timpson-63 asked

Import Editor Extension Error

Hey guys,

I'm getting the following errors when importing the latest Unity Editor Extension. Please help:

Assets/PlayFabEditorExtensions/Editor/PlayFabEditor.cs(170,47): error CS0433: The imported type `System.Action' is defined multiple times

Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabGuiFieldHelper.cs(23,118): error CS0433: The imported type `System.Func<T,TResult>' is defined multiple times

Thanks,

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

·
1807605288 avatar image
1807605288 answered

For most users, this kind of error can occur if you have defined the conflicting object type(s) at the root level of your project, without any namespacing. In this case, you have probably defined something called "Action" and/or "Func" in one of your project files. It is generally a bad idea to re-use the names of the core language pieces.

If that's not the case, we'll need to know your unity version, what unity settings you've set (like whether you're using mono, or .net 4.6, #defines, platform, etc). We need to know the PlayFab SDK version you're using, and the version of Editor Extensions.

Honestly, given that the name conflict fully expresses "System.Func" and "System.Action", I suspect something deeper and more insidious though, because those things are in the core of the language itself.

I might not be able to solve this one without being able to see your project code.

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

timpson-63 avatar image timpson-63 commented ·

Hey Paul,

I can confirm that I haven't personally defined anything called "Action" and/or "Func" in any of my project files.

The unity version was 5.6.2f1.

I'm setup to publish to WebGL as I plan to publish to Kongregate.

I'm new to PlayFab, so I was just downloading the most recent SDK and Editor Extensions from the website.

I'm not sure about mono or .net 4.6 or my #defines as I haven't specifically set them so I guess I'd be using whatever the default is for this version of Unity.

Does the PlayFab UnitySDK have a problem with publishing to WebGL?

Thanks,

0 Likes 0 ·
timpson-63 avatar image timpson-63 timpson-63 commented ·

I've also tried updating my Unity Version to 2017.3, but I'm still having the same issue with both the SDK and the Editor Extension.

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ commented ·

I've had multiple confirmations that WebGL works for other customers. I haven't tried a WebGL build myself recently, but we haven't heard any issues until yours.

Both of these issues occur in PlayFabEditorExtensions, not the SDK itself.

Editor Extensions is optional. You can delete the EditorExtensions so that you can work, while I investigate. That should get you unblocked.

0 Likes 0 ·
timpson-63 avatar image timpson-63 commented ·

@PaulGilmore,

After removing the Editor Extensions and downloading the SDK only, I'm still getting the error with System.Action. Have you been able to find anything in regards to this?

Thank you for the help.

0 Likes 0 ·
timpson-63 avatar image timpson-63 commented ·

Here is the latest error with only downloading the SDK. It seems to be in: IPlayFabHttp.cs

Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/IPlayFabHttp.cs(61,16): error CS0433: The imported type `System.Action' is defined multiple times

0 Likes 0 ·
1807605288 avatar image 1807605288 ♦ commented ·

I have just tested our SDK by making a WebGL build.

There were no compile conflicts, and the build was successful, and executed API calls successfully.

As I said in my first response, this kind of issue is almost always a namespace issue between two blocks of code.

If you are using other 3rd party SDK's, I suggest trying to remove/disable each one in turn, and figure out which one causes the conflict. If that fails, you should also try and repeat that process by disabling/commenting sections of your own code until you find the conflict.

There isn't really anything else I can do for you in this case. You have to carefully dig through all the code of your project and find the namespace conflict.

0 Likes 0 ·
Show more comments

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.