- Home /
Disable Facebook plugin for Windows Phone 8
I'm creating a game for multiple platforms. Because Facebook is not yet supported for Windows Phone 8, I will have to disable the plugin for Windows Phone 8, or else I will not be able to compile (receiving errors about FB.cs).
While using the Facebook plugin for iOS and Android, I would like to compile the same project for Windows Phone 8 without using the Facebook plugin. So, is there any way I can disable the whole plugin for Windows Phone 8, so I can successfully compile?
Thanks
Answer by Landern · May 09, 2014 at 02:02 PM
Check Application.platform for enum RuntimePlatform.WP8Player and exclude the execution of the facebook plugin
In this case is the "#if" statement better in it's place.
Answer by Jeff-Kesselman · May 09, 2014 at 03:05 PM
You can remove it entirely from the compiled code by using a #if
#if !UNITY_WP8
// code not to include for Windows 8 goes here
#endif
All defines are documented at https://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html
I tried this. But for some reason it's not ignoring the code. I'm still receiving the errors.