2
我正在工作Facebook的統一SDK,一切都很好的統一編輯器,但不適用於Android設備。 fb.init調用時「應用程序停止」。Facebook上的Unity SDK崩潰時,fb.init被調用
我使用統一版本5.5.1和Facebook SDK版本7.9.4
這裏是代碼:
public void teststr()
{
if (!FB.IsInitialized) {
// Initialize the Facebook SDK
FB.Init(InitCallback, OnHideUnity);
} else {
// Already initialized, signal an app activation App Event
}
}
private void InitCallback()
{
if (FB.IsInitialized) {
// ...
} else {
}
}
private void OnHideUnity (bool isGameShown)
{
if (!isGameShown) {
// Pause the game - we will need to hide
Time.timeScale = 0;
} else {
// Resume the game - we're getting focus again
Time.timeScale = 1;
}
}
teststr功能火災時,我按下按鈕
你能粘貼在logcat中所示的錯誤? –