Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Using Playfab with Windows Store

Discussion in 'Windows' started by TheGoodNeighbor, Dec 1, 2015.

  1. TheGoodNeighbor

    TheGoodNeighbor

    Joined:
    Oct 17, 2015
    Posts:
    9
    I'm just wondering if somebody had any luck using playfab for windows store games. It's not compiling againts windows store environments...
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    What error exactly do you get?
    Prefabs and instantiating them works fine, but there are differences in .NET API on WSA compared to Mono platforms.
     
  3. TheGoodNeighbor

    TheGoodNeighbor

    Joined:
    Oct 17, 2015
    Posts:
    9
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    Oh, sorry, misread the text.
    What errors do you get? Can you paste some of them here?
     
  5. TheGoodNeighbor

    TheGoodNeighbor

    Joined:
    Oct 17, 2015
    Posts:
    9
  6. leandro-manifesto

    leandro-manifesto

    Joined:
    Apr 13, 2015
    Posts:
    3
    I had to gut the code using System.Net in the PlayFabHTTP and fix several problems in the Json.Net library bundled with it so that my project would compile.
     
  7. TheGoodNeighbor

    TheGoodNeighbor

    Joined:
    Oct 17, 2015
    Posts:
    9
    Could you help me out? What exactly did you do?
    I commented out the the problematic part in PlayFabHTTP but i have no idea how to fix the Json.Net library...
     
  8. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    You need the other version of Json.Net.dll, the one compatible with Windows Store.
     
  9. leandro-manifesto

    leandro-manifesto

    Joined:
    Apr 13, 2015
    Posts:
    3
    The Json.Net included with PlayFab is the same one from the Asset Store.
    It has several implementations specific for Windows RT(-ish) platforms in the WinRT folder.
    It was just a matter of updating some of the conditional compilation checks to work on WSA.
     
  10. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    It is actually a subset of the one on the asset store. I was working with PlayFab to try to get a workable solution for them that would allow them to license a subset of JSON .NET specific to their implementation for their API but it's not perfect. The problems creep in with supporting newer versions of Unity and being able to selectively support IL2CPP vs Mono for some platforms and also for Windows 10 Universal applications which so far I've only been able to get completely working by using a precompiled DLL version. There also were some changes with the WinRT API (on the Unity side) that brought in some type extension features that previously didn't exist so it creates some errors.

    If you do have a license for JSON .NET for Unity from the asset store I can help you replace what is integrated with the PlayFab API with the full version and get it working.
     
  11. TheGoodNeighbor

    TheGoodNeighbor

    Joined:
    Oct 17, 2015
    Posts:
    9
    Thanks guys. But in the meantime I replaced PlayFab with GameSparks and they support Unity WinRT out of the box.