question

justas.antanauskas@gmail.com avatar image
justas.antanauskas@gmail.com asked

Unity 5.3 Windows Phone compatibility

Hello,

So I am trying to port my game to Windows Phone 8.1 platform.
I'm using WinRT plugin to fix some .NET PlayFab incompatibilities, but current PlayFab build has just too many issues to fix on my own.
Is this platform currently not supported or am i missing something?

10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

Hi Justas, 

We are aware of this bug and a fix for it should be coming out very soon to resolve it.  The main problem that we are having is that the JSON.NET  library that we are currently using in our SDK for Unity does not support  the Windows mobile platforms.  We are in the process of swapping this out for a new library, but it has taken longer than we had hoped because there are some features like custom deserializers for DateTime that we use that we can't seem to find in any other library.

Therefore, we are in the process of writing our own JSON serialization library that will work cross platform and will be open sourced to our community.

We will notify the community when this fix has been published.  Keep an eye out in Game Manager alerts, blog posts and our Release notes for when this fix is published.  https://api.playfab.com/releasenotes

 

 

10 |1200

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

Przemek avatar image
Przemek answered

Hi Marco,

When are you planning to release an update with the fixes for the Windows Store Apps? Just like Jurtas I am trying to port the game to Windows Phone. I was trying change the pre-proces directives in PlayFabHTTP Class (lack of UNITY_WSA), but then I got even more compile errors ;-)

Is it matter of days or weeks?

In the meantime, thank you so much for your attention and participation.

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

The fix for the original post in this thread was released in late February:
https://api.playfab.com/releasenotes#160222

If you are still having issues with Windows Store, please provide specific details.  Since you are experiencing a compile error, please post the details of that error.  If you are experiencing an exception, please provide the stack trace. If you are changing sdk code, please provide a link to a public GitHub repository for us to examine, or (if the changes are relatively small) post your code changes here.

You can fork our GitHub repository, and submit your changes to your own fork, which will make it very easy for us to review.  Start here: (https://github.com/PlayFab/UnitySDK), [create a GitHub account if you don't already have one - it's free,] create a fork, and submit your changes.  When all this is set, post a link to your specific fork on your GitHub account.

Finally, please make sure you are using our latest sdk: https://github.com/PlayFab/UnitySDK/archive/versioned.zip

10 |1200

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

Przemek avatar image
Przemek answered

First of all, thank you for your response. I tried the lastest unitypackage today already and it seems that the compile issues are still present. Now i'm out of my office but  i remember, that there are references to Thread class (no available on Windows Phone 8.1), overriding Close () method of Stream classes (not present on WP either) and few more. Basically These compile errors occure because of differences in .NET between Windows Store Apps and other platforms.

10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

@PP  We are looking into it and we will retest for this issue.  Can you provide any additional information, like the stacktrace or error that you are getting? Also can you send us a screenshot of your build settings.

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.

Przemek avatar image
Przemek answered

It's pretty easy to repeat these errors. Create new project in Unity and import Playfab via unitypackage. Then (you have to be on Windows 8.1 or higher and have installed VS - I'm working on Windows 10 now.) Try to build for Windows Store ("Editor compile" is fine).

 

Firstly you will see:

 

Assets\PlayFabSDK\Internal\PlayFabHTTP.cs(24,24): error CS0246: The type or namespace name 'Thread' could not be found (are you missing a using directive or an assembly reference?).

Assets\PlayFabSDK\Internal\PlayFabHTTP.cs(330,90): error CS0234: The type or namespace name 'X509Certificates' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?)

Assets\PlayFabSDK\Internal\PlayFabHTTP.cs(330,165): error CS0234: The type or namespace name 'X509Certificates' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?)

Assets\PlayFabSDK\Internal\PlayFabHTTP.cs(330,210): error CS0234: The type or namespace name 'Security' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

 

After fix the PlayFabHTTP class you will get this:

 

Assets\PlayFabSDK\Ionic.Zlib\CRC32.cs(805,30): error CS0115: "Ionic.Crc.CrcCalculatorStream.Close()": No suitable method found to override.

Assets\PlayFabSDK\Ionic.Zlib\ParallelDeflateOutputStream.cs(741,30): error CS0115: "Ionic.Zlib.ParallelDeflateOutputStream.Close()": No suitable method found to override.

Assets\PlayFabSDK\Ionic.Zlib\ZlibBaseStream.cs(302,30): error CS0115: "Ionic.Zlib.ZlibBaseStream.Close()": No suitable method found to override.

 

After you delete the override keywords (yup i know that is not the way - but the compile can pass further), you will get next 25 compile errors because of differences in .NET API (for example lack of Thread class) . BTW In Stream classes on WSA there is only Dispose() method - there is no Close() method.

 

Assets\PlayFabSDK\Internal\SimpleJson.cs(1033,50): error CS1061: 'System.Type' does not contain a definition for 'IsGenericType' and no extension method 'IsGenericType' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

Assets\PlayFabSDK\Internal\SimpleJson.cs(1405,36): error CS1061: 'System.Type' does not contain a definition for 'IsEnum' and no extension method 'IsEnum' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

Assets\PlayFabSDK\Uunit\UUnitTestCase.cs(46,42): error CS1061: 'System.Type' does not contain a definition for 'GetMethod' and no extension method 'GetMethod' accepting a first argument of type 'System.Type' could be found (are you missing a using directive or an assembly reference?)

...

10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

thanks @PP ,  I will be taking a look at this.  I think part of the problem you are having is that we have pre-processor directives for  UNITY_WP8  but we did not include UNITY_WSA as those two follow in the same rule. 

I know we have tested on a Windows Phone with our SDK and it works.  So we probably need to apply the same to WSA.  

I'll be running some tests this week to work out this bug and I have moved this issue to a high priority.

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.

Przemek avatar image
Przemek answered

Thank you so much :-) Look forward to hear from you then.

I am sure that unfortunately simply replacing UNITY_WP8 by UNITY_WSA do not fix the problem. You can meet compile errors in lines outside the parts of code with conditional compilation as well.

10 |1200

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

justas.antanauskas@gmail.com avatar image
justas.antanauskas@gmail.com answered

I can attest having same results as PP. Changing UNITY_WP8  to UNITY_WSA doesn't fix this. Also checked latest sdk which seems to have same problem ( type or namespace 'Thread', 'X509Ceritifcates', 'Security'' does not exist).

10 |1200

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

marcowilliamspf avatar image
marcowilliamspf answered

Please follow our new SDK, https://github.com/PlayFab/UnitySDKV2Beta which is in Beta.  We've made a number of fixes for better cross-platform support, particlarly for Windows Phone.  Right now, we are still device testing to ensure everything is working.  Next week starts the official public beta and we will be releasing a blog post about it.

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.