Unable to verify assembly data; you must provide an authorization key when loading this assembly

十年热恋 提交于 2019-11-28 02:29:53

问题


I'm testing the InteractiveConsole example in Unity. I did some configurations as described in the official tutorial. After some setups I got on step 7: Run our example code.

However, I'm receiving the following errors:

Unable to verify assembly data; you must provide an authorization key when loading this assembly. UnityEngine.Security:LoadAndVerifyAssembly(Byte[]) c__Iterator1:MoveNext() (at Assets/Facebook/Scripts/FB.cs:326)

Could not securely load assembly from https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/lib/sdk_4.0/CanvasFacebook.dll UnityEngine.Debug:LogError(Object) FbDebug:Error(String) c__Iterator1:MoveNext() (at Assets/Facebook/Scripts/FB.cs:329)

Not sure what to do. Any ideas?


回答1:


Instead of change the call to LoadAndVerifyAssembly as @BrianJew suggests, you simply can change the line 381 of FB.cs, where it says

#if UNITY_4_5

you should put

#if UNITY_4_5 || UNITY_4_6

Or the appropiate flag for your Unity's version. In that block the key is obtained from this URL https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/key/sdk_5.1/AuthToken.unityhash




回答2:


Another simple fix:

Change line 411 of FB.cs to:

#if UNITY_4_5 || UNITY_EDITOR

This has been tested in version 5.2.1.




回答3:


Same thing for unity 5.1, just add || UNITY_5_1 to corresponding line in FB.cs



来源:https://stackoverflow.com/questions/21815128/unable-to-verify-assembly-data-you-must-provide-an-authorization-key-when-loadi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!