question

removed avatar image
removed asked

Reflection exception when importing PlayFab into my project

The error below completely stops me from being able to use PlayFab. I have tried re-importing it but to no avail.



ReflectionTypeLoadException: The classes in the module cannot be loaded.
System.Reflection.Assembly.GetTypes () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/Assembly.cs:371)
PlayFab.PfEditor.PlayFabEditorSDKTools.GetPlayFabSettings () (at Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorSDKTools.cs:237)
PlayFab.PfEditor.PlayFabEditorDataService+PlayFab_SharedSettingsProxy..ctor () (at Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs:75)
PlayFab.PfEditor.PlayFabEditorDataService..cctor () (at Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs:142)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for PlayFab.PfEditor.PlayFabEditorDataService
PlayFab.PfEditor.PlayFabEditorDataMenu.RegisterMenu () (at Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs:97)
PlayFab.PfEditor.PlayFabEditorDataMenu..cctor () (at Assets/PlayFabEditorExtensions/Editor/Scripts/Panels/PlayFabEditorDataMenu.cs:78)
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.

removed avatar image removed commented ·

Note: this is only for Editor extensions.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Which SDK version are you using, and which version of the editor extensions? Can you confirm that if you create a fresh project on your machine, and just import the SDK and extensions, that you're seeing this issue?

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.

removed avatar image removed commented ·

I managed to solve the issue actually. Basically, when I restored my project from source control, a dll file was missing and for some reason, it must have caused a dll for an incompatible .NET assembly to be included which caused the line above to throw the exception (all speculation). Reimporting the other asset caused it to re-add the missing dll file and then PlayFabEditorExtensions ended up working.

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.