Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Facebook SDK Problem

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

  1. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,166
    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,166
  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,166
    @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,666
    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,166
  8. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    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,666
    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:
    996