Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FacebookStore.dll ignores meta file changes

Discussion in 'Unity IAP' started by HiddenJason, Oct 28, 2019.

  1. HiddenJason

    HiddenJason

    Joined:
    Apr 18, 2016
    Posts:
    23
    I'm developing a console version of an existing app that uses UnityIAP. On the console build, it fails because it tries to include FacebookStore.dll - even though any references to UnityIAP are removed from code.

    I attempt to turn off the console platform in the dll's meta file, but Unity keeps turning it back on. I've disabled the platform on every other UnityPurchasing module that was defaulting to "Any Platform" with no problem.

    If I remove the dll entirely, the editor complains about the assembly being missing because it's needed by Stores.dll

    I've even gone so far as to, with Unity closed, move the entire "Facebook" folder out of the Unity project, edit the meta file by hand, and then copy it back in with Unity open - at which point Unity resets that DLL to "Any Platform"

    I'd upload the project as an example, but I've done that dozens of times for various bugs, and that knocks my development system out of commission for 4-6 hours each time (it's a large project).

    I'm not using the Facebook store in any version of the game, so it would be nice if I could get rid of all Facebook references entirely.

    This is happening in 2019.1.14f1 / UnityIAP 1.23
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, the facebook.dll that is included is a stub dll when you don't select the Facebook platform, and so should be safe to include. The stub.dll allows the Unity compiler to succeed. We are discussing ways to remove these stub files in a future release.
     
  3. HiddenJason

    HiddenJason

    Joined:
    Apr 18, 2016
    Posts:
    23
    Even as a stub, it pulls in other unnecessary modules:

    ArgumentException: The Assembly Purchasing.Common is referenced by FacebookStore ('Assets/Plugins/UnityPurchasing/Bin/Facebook/FacebookStore.dll'). But the dll is not allowed to be included or could not be found.

    It might work to go the other direction and enable all the Unity IAP modules on the platform even though none of them will be used. Obviously that's not an ideal option, to work around what is obviously some bad code that's reverting those settings on the FacebookStore assembly.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, you are correct. Typically users create two separate builds/separate projects in cases like yours. Granted not ideal, we are looking at better solutions for a future release.
     
    HiddenJason likes this.