我有一个 Unity 5.3.1 iOS 项目,它也使用新的多人游戏网络 UNet。可怕的东西。当我构建并运行项目时,我在 Xcode 中收到以下错误:
Use of undeclared identifier `IL2CPP_RAISE_MANAGED_EXCEPTION`
该项目在 Unity 编辑器中运行良好。它位于一个巨大的 Bulk_Generics_10.cpp 脚本中,用于处理System.Comparison1<UnityEngine.Networking.NetworkSystem.PeerInfoPlayer
这是发现错误的代码块。
// System.Void
System.Linq.Enumerable/<CreateDistinctIterator>c__Iterator3`1<System.Object>::Reset()
extern TypeInfo*
NotSupportedException_t1382227673_0_il2cpp_TypeInfo_var; extern const
uint32_t
U3CCreateDistinctIteratorU3Ec__Iterator3_1_Reset_m_1278777949_0_MetadataUsageId;
extern "C" void
U3CCreateDistinctIteratorU3Ec__Iterator3_1_Reset_m_1278777949_0_gshared
(U3CCreateDistinctIteratorU3Ec__Iterator3_1_t1454147488_0 * __this,
const MethodInfo* method) { static bool s_Il2CppMethodIntialized; if
(!s_Il2CppMethodIntialized) { il2cpp_codegen_initialize_method
(U3CCreateDistinctIteratorU3Ec__Iterator3_1_Reset_m_1278777949_0_MetadataUsageId);
s_Il2CppMethodIntialized = true; } {
NotSupportedException_t1382227673_0 * L_0 =
(NotSupportedException_t1382227673_0 *)il2cpp_codegen_object_new
(NotSupportedException_t1382227673_0_il2cpp_TypeInfo_var);
NotSupportedException__ctor_m149930845_0(L_0, /*hidden
argument*/NULL); IL2CPP_RAISE_MANAGED_EXCEPTION(L_0); } }
看起来 Unity 并没有将其完全交给 Xcode。我想知道是否需要在 Unity 中进行一些调整。
我该如何纠正这个错误?