Facebook Unity SDK在导入包上编译错误

时间:2023-01-22 17:37:49

I tried to add the Facebook SDK to my existing Unity 5 project using the official guide here: https://developers.facebook.com/docs/unity/getting-started/canvas

我尝试使用官方指南将Facebook SDK添加到我现有的Unity 5项目中:https://developers.facebook.com/docs/unity/getting-started/canvas

After importing the Facebook SDK custom package into my project via: Assets -> Import Package -> Custom Package..

通过以下方式将Facebook SDK自定义包导入我的项目后:资产 - >导入包 - >自定义包..

After importing the package, I get the following 3 compilation errors:

导入包后,我收到以下3个编译错误:

  • Assets/Facebook/Editor/FacebookSettingsEditor.cs(166,67): error CS0117 PlayerSettings' does not contain a definition for bundleIdentifier'
  • Assets / Facebook / Editor / FacebookSettingsEditor.cs(166,67):错误CS0117 PlayerSettings'不包含bundleIdentifier的定义'

  • Assets/Facebook/Editor/FacebookSettingsEditor.cs(166,13): error CS1502: The best overloaded method match for `FacebookSettingsEditor.SelectableLabelField(UnityEngine.GUIContent, string)' has some invalid arguments
  • Assets / Facebook / Editor / FacebookSettingsEditor.cs(166,13):错误CS1502:“FacebookSettingsEditor.SelectableLabelField(UnityEngine.GUIContent,string)”的最佳重载方法匹配有一些无效的参数

  • Assets/Facebook/Editor/FacebookSettingsEditor.cs(166,13): error CS1503: Argument #2' cannot convertobject' expression to type `string'
  • Assets / Facebook / Editor / FacebookSettingsEditor.cs(166,13):错误CS1503:参数#2'无法将对象'表达式转换为类型`string'

The versions used are:

使用的版本是:

  • Facebook SDK for Unity Package 6.2.2
  • 用于Unity Package 6.2.2的Facebook SDK

  • Unity 5 Version 5.0.0f4
  • Unity 5版本5.0.0f4

I also closed the project and reopened it by restarting Unity. The errors are still there.

我还关闭了项目,并通过重新启动Unity重新打开它。错误仍然存​​在。

What could be the cause of the compilation errors and how can I fix it?

可能是编译错误的原因是什么,我该如何解决?

Thank you very much.

非常感谢你。

1 个解决方案

#1


Facebook Unity SDK currently only Support upto Unity 4.6 for web builds. See Note in this link : https://developers.facebook.com/docs/unity/downloads Which platform are you using?

Facebook Unity SDK目前仅支持Unity 4.6进行Web构建。请参阅此链接中的注意:https://developers.facebook.com/docs/unity/downloads您使用的是哪个平台?

#1


Facebook Unity SDK currently only Support upto Unity 4.6 for web builds. See Note in this link : https://developers.facebook.com/docs/unity/downloads Which platform are you using?

Facebook Unity SDK目前仅支持Unity 4.6进行Web构建。请参阅此链接中的注意:https://developers.facebook.com/docs/unity/downloads您使用的是哪个平台?