locked
[U8.1][C#]Developing a Unity plugin from the new Windows Facebook SDK RRS feed

  • Question

  • I'm trying to integrate FB into a game I'm developing for Windows Phone/ Mobile.  I'd put it on hold for a long time, until I came across this new SDK: https://blogs.windows.com/buildingapps/2015/07/14/windows-sdk-for-facebook/

    I've been trying for a few days to get this readable in Unity, I thought the best way would be to create a plugin by building a .dll from the SDK, however, I'm completely stuck.

    Firstly- Just opening the examples give me an error, the namespace facebook can't be found, so it doesn't compile with 'using facebook' - even though I've added the .vxcproj references required.

    Secondly- I imported the FBWinSDK.Windows and FBWinSDK.WindowsPhone into a new .NET 3.5 solution, but running into the same problems as above - hopefully fixing this will sort it all out.

    I'm stuck and hoping for some help/ pointers.

    Thanks.

    Wednesday, September 9, 2015 2:30 PM

Answers

  • Is it because I'm trying to do it in a .NET 3.5 project? 3.5 is needed for Unity, it doesn't work with anything higher.

    This is incorrect for Windows Store targets: Unity uses Windows' in-box CLR for Windows apps rather than mono as on other targets. You can create the full plugin for WSA to package in a the app and a stub 3.5 version of the plugin to run in the ediiter. See Unity Manual - Windows Store Apps: Plugins

    Tuesday, September 22, 2015 2:47 PM

All replies

  • Hi Carwash1,

    >>Just opening the examples give me an error, the namespace facebook can't be found, so it doesn't compile with 'using facebook' - even though I've added the .vxcproj references required

    You need to select Build action for your solution, please follow these steps:

    1) Right-Click Solution LoginCs -> Properties
    2) Select Build Action for all porjects
    3) Change Platform for LoginCs.Windows and LoginCs.WindowsPhone

    >>I imported the FBWinSDK.Windows and FBWinSDK.WindowsPhone into a new .NET 3.5 solution, but running into the same problems as above - hopefully fixing this will sort it all out

    The solution is the same, please config your Build action and Platform.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 10, 2015 9:56 AM
  • That sorted it, thanks.
    Friday, September 11, 2015 11:26 AM
  • I'm afraid I spoke too soon, now I'm getting "The project 'FBWinSDK.WindowsPhone' cannot be referenced' (and same for .Windows) in my new project - it works fine now in the sample LoginCS project.

    Is it because I'm trying to do it in a .NET 3.5 project? 3.5 is needed for Unity, it doesn't work with anything higher.

    [Edit:

    Here's a screenshot of what you said to change (I'm unable to select deploy):


    • Edited by Carwash1 Friday, September 11, 2015 1:07 PM
    Friday, September 11, 2015 1:04 PM
  • Small bump in the hopes to get another reply.
    Wednesday, September 16, 2015 5:05 AM
  • I'm afraid I spoke too soon, now I'm getting "The project 'FBWinSDK.WindowsPhone' cannot be referenced' (and same for .Windows) in my new project - it works fine now in the sample LoginCS project.

    Is it because I'm trying to do it in a .NET 3.5 project? 3.5 is needed for Unity, it doesn't work with anything higher.

    [Edit:

    Here's a screenshot of what you said to change (I'm unable to select deploy):


    Hi Carwash1,

    >>Is it because I'm trying to do it in a .NET 3.5 project? 3.5 is needed for Unity, it doesn't work with anything higher.

    Yes, from my testing, it's not working with .Net 3.5 project, you've better to submit this issue in Issue site: https://github.com/Microsoft/winsdkfb/issues


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 22, 2015 11:51 AM
  • Is it because I'm trying to do it in a .NET 3.5 project? 3.5 is needed for Unity, it doesn't work with anything higher.

    This is incorrect for Windows Store targets: Unity uses Windows' in-box CLR for Windows apps rather than mono as on other targets. You can create the full plugin for WSA to package in a the app and a stub 3.5 version of the plugin to run in the ediiter. See Unity Manual - Windows Store Apps: Plugins

    Tuesday, September 22, 2015 2:47 PM