【发布时间】:2021-04-09 15:15:27
【问题描述】:
使用 Facebook 的 Unity 插件 (v5.0.3) 开发适用于 Android 的 Unity 游戏。 一段时间以来,我们的大多数用户都可以正常使用 Facebook 登录。 尽管最近我们收到了来自 Crittercism 的以下崩溃报告。 想知道是否有其他人经历过这种情况并有一些提示?
非常确定我们在 C Sharp 代码中正确调用了 FB.Init() - 已经使用 Android 监控工具跟踪了整个流程以查看日志。
与此同时,我们添加了更多日志记录以尝试获取更多信息。
谢谢!
Stack Trace
_________________________________
0 java.lang.Exception: NullReferenceException: Facebook object is not yet loaded. Did you call FB.Init()?
1 at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
2 at com.unity3d.player.UnityPlayer.a(Unknown Source)
3 at com.unity3d.player.UnityPlayer$a.run(Unknown Source)
4 Caused by: java.lang.Throwable: FB.get_FacebookImpl ()
5 FB.Login (System.String scope, Facebook.FacebookDelegate callback)
6 Zynga.Casino.Auth.FacebookUser.OnInitComplete ()
7 Zynga.Casino.Auth.FacebookUser.LogIn ()
8 Zynga.Poker.Auth.Unity.FacebookLogin.LogInFacebookUser ()
9 Zynga.Poker.Auth.Unity.FacebookLogin.OnPress (Boolean isDown)
10 UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
11 UICamera:Notify(GameObject, String, Object)
12 UICamera:ProcessTouch(Boolean, Boolean)
13 UICamera:ProcessTouches()
14 UICamera:Update()
15
16 ... 3 more
17 java.lang.Throwable: FB.get_FacebookImpl ()
18 FB.Login (System.String scope, Facebook.FacebookDelegate callback)
19 Zynga.Casino.Auth.FacebookUser.OnInitComplete ()
20 Zynga.Casino.Auth.FacebookUser.LogIn ()
21 Zynga.Poker.Auth.Unity.FacebookLogin.LogInFacebookUser ()
22 Zynga.Poker.Auth.Unity.FacebookLogin.OnPress (Boolean isDown)
23 UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
24 UICamera:Notify(GameObject, String, Object)
25 UICamera:ProcessTouch(Boolean, Boolean)
26 UICamera:ProcessTouches()
27 UICamera:Update()
28
29 at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
30 at com.unity3d.player.UnityPlayer.a(Unknown Source)
31 at com.unity3d.player.UnityPlayer$a.run(Unknown Source)
【问题讨论】: