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. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

Facebook SDK Problem

Discussion in '5.6 Beta' started by atmuc, Dec 19, 2016.

  1. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,082
    i import facebook sdk 7.9.0. i get following error. I think unity adds buildin facebook sdk.

    error CS1704: An assembly with the same name `Facebook.Unity' has already been imported. Consider removing one of the references or sign the assembly
    Library/FacebookSDK/Facebook.Unity.dll (Location of the symbol related to previous error)
    Assets/FacebookSDK/Plugins/Facebook.Unity.dll (Location of the symbol related to previous error)
    error CS1704: An assembly with the same name `Facebook.Unity.Settings' has already been imported. Consider removing one of the references or sign the assembly
    Library/FacebookSDK/Facebook.Unity.Settings.dll (Location of the symbol related to previous error)
    Assets/FacebookSDK/Plugins/Settings/Facebook.Unity.Settings.dll (Location of the symbol related to previous error)
     
    lexi89puzzle and Poemind like this.
  2. hencz

    hencz

    Joined:
    Aug 19, 2010
    Posts:
    86
    what is your build target?
     
  3. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,082
  4. hencz

    hencz

    Joined:
    Aug 19, 2010
    Posts:
    86
    Then I don't think you need to add a facebook sdk explicitly, try removing it
     
  5. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,082
    @hencz When i remove it, it works. my game is not just for facebook. for android and ios i must keep facebook sdk in my project. so it is not good for me to remove it on each facebook build.
     
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,664
    The idea is that any Facebook SDK you include in your project should override the built-in one. However, this is broken in 5.6 right now. It will be fixed in 5.6 later, but for now, you should either delete the SDK in your project to make it work, or disable it for Standalone and WebGL platforms (in the plugin inspector of the dlls) to work around the problem.
     
  7. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,082
  8. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,577
    it doesn't work, even if you try to run it for windows universal 10, you'll get an error if you have the sdk imported. And if you remove it, then all hell breaks lose in the other platforms
     
  9. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,664
    I guess you may have to disable it for the editor as well. Or wait for the fix, which will be in a future 5.6 build.
     
  10. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    880
unityunity