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

Integrated Facebook SDK

Discussion in '5.6 Beta' started by Hanoble, Mar 9, 2017.

  1. Hanoble

    Hanoble

    Joined:
    Apr 18, 2013
    Posts:
    28
    We have moved up to the 5.6 beta in preparation for Facebook Gameroom and the official 5.6 release at the end of the month and have ran into an issue with the Facebook SDK. We have been using the Facebook for Unity SDK for years now to support Facebook features across our various platforms. This has been via the Facebook for Unity SDK, which is just a Unity package that was imported into the project and setup to be used across several platforms.

    With the Unity 5.6 beta, the Unity Facebook SDK that is integrated into Unity is located at ProjectRoot > Library > Facebook SDK. When I go into PlayerSettings > Facebook and enter an app ID, the FacebookSDK folder is created with a FacebookSettings object.

    However, when I am not in the Facebook platform target, I get compiler errors because the Facebook.Unity namespace cannot be found. I had assumed that with the Facebook SDK integrated into Unity, it would still be multiplatform and we would be able to import the additonal SDK files needed (such as Android and iOS).

    Is this not how the Unity Facebook SDK integration is meant to be implemented? For projects supporting multiple platforms should we not even use the integrated Facebook SDK and continue using the Facebook SDK package here? If that is the case should we not download the Facebook Gameroom build option at all, as this I believe is what brings the integrated SDK into the project in the first place? We are still able to upload to Gameroom without the build target by uploading a standalone version, but is this the actual intended implementation? Am I just missing something to allow the integrated SDK to be multiplatform?

    Any information would be greatly appreciated.
     
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,067
    Hello,

    could you be so nice and send a bug report with a quick repro of this and ping the case number here?
    Thanks!
     
  3. bogdan-hodorogea

    bogdan-hodorogea

    Joined:
    Nov 2, 2015
    Posts:
    8
    Hi, we are currently running in to the same issue.

    Was the bug reported or should we submit a repro project?
     
  4. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,067
    Haven't seen one yet so please do. Thanks!
     
  5. bogdan-hodorogea

    bogdan-hodorogea

    Joined:
    Nov 2, 2015
    Posts:
    8
    After further investigating, and starting from a blank project we realized that all we had to do is restart unity, and the compile errors went away.

    So , to recap our scenario : in Unity 5.6.0b11 we still imported Facebook SDK 7.9.4 and we needed to restart Unity to get rid of compile errors on the Android platform.
     
  6. Hanoble

    Hanoble

    Joined:
    Apr 18, 2013
    Posts:
    28
    I was unable to reproduce the issue in a clean project, and sending our 60gb commercial project is not a real option, so I dug further into exactly what was going on. I am unsure if it was a restart or what, but eventually I started to see that our custom SDK was overriding the implemented Unity integrated SDK (this was saw directly from the Facebook build settings).

    The issue does seem to be related to upgrading projects with an existing Facebook SDK to a version of Unity with the integrated SDK, but once we got beyond the issue we have not spent a lot of resources looking back.