当我点击Unity中的 Facebook按钮时,我升级到最新版本的Facebook SDK 7.8.0并使用 Unity 5.4.0.3f 编辑,我收到一个奇怪的错误:
不允许从ScriptableObject构造函数(或实例字段初始化程序)调用get_activeBuildTarget,而是在OnEnable中调用它。从ScriptableObject' FacebookSettingsEditor'调用。 请参阅"脚本序列化"有关详细信息,请参阅Unity手册中的页面。 0x0000000140E431ED(Unity)StackWalker :: GetCurrentCallstack 0x0000000140E44EE1(Unity)StackWalker :: ShowCallstack 0x00000001405FC603(Unity)GetStacktrace 0x00000001405F97FE(Unity)DebugStringToFile 0x00000001405F9C5C(Unity)DebugStringToFile 0x000000014035F701(Unity)ThreadAndSerializationSafeCheckReportError 0x00000001413CE6D8(Unity)EditorUserBuildSettings_Get_Custom_PropActiveBuildTarget 0x00000000134DFF3A(Mono JIT代码)(托管管理到本机)UnityEditor.EditorUserBuildSettings:get_activeBuildTarget() 0x000000001F75195E(Mono JIT Code)Facebook.Unity.Editor.FacebookSettingsEditor:.ctor() 0x000000000A4C68E2(Mono JIT代码)(包装器运行时调用)对象:runtime_invoke_void__this__(object,intptr,intptr,intptr) 0x00007FF929D6519B(mono)[mini.c:4937] mono_jit_runtime_invoke 0x00007FF929CB84FD(mono)[object.c:2623] mono_runtime_invoke 0x00000001403399E5(Unity)mono_runtime_invoke_profiled 0x0000000140339BD1(Unity)mono_runtime_object_init_exception 0x00000001403606A2(Unity)scripting_unity_engine_object_new_and_invoke_default_constructor 0x0000000140343F0F(Unity)MonoBehaviour :: RebuildMonoInstance 0x00000001403440B1(Unity)MonoBehaviour :: RebuildMonoInstanceFromScriptChange 0x000000014034420E(Unity)MonoBehaviour :: SetClass 0x0000000140B85515(Unity)IsCustomEditorDirty 0x0000000140B85FEA(Unity)CreateInspectorMonoBehaviour 0x0000000140B7BFCB(Unity)ActiveEditorTracker :: Rebuild 0x0000000140B7C709(Unity)ActiveEditorTracker :: DidFlushDirty 0x0000000140C82144(Unity)SceneTracker :: FlushDirty 0x0000000140BD3F5E(Unity)Application :: UpdateSceneIfNeeded 0x0000000140BDBE54(Unity)Application :: TickTimer 0x0000000140E3D91E(Unity)FindMonoBinaryToUse 0x0000000140E3EF4C(Unity)WinMain 0x00000001415BCA40(Unity)strnlen 0x00007FF952788102(KERNEL32)BaseThreadInitThunk
如何解决此问题的任何想法:(?
提前致谢!