异常信息具体如下:
InvalidOperationException: Burst failed to compile the function pointer `Int32 ValidateCollinear$BurstManaged(Unity.Mathematics.float2*, Int32, Single)`
Unity.Burst.BurstCompiler.Compile (System.Object delegateObj, System.Reflection.MethodInfo methodInfo, System.Boolean isFunctionPointer, System.Boolean isILPostProcessing) (at Library/PackageCache/com.unity.burst@1.8.4/Runtime/BurstCompiler.cs:465)
Unity.Burst.BurstCompiler.CompileILPPMethod2 (System.RuntimeMethodHandle burstMethodHandle) (at Library/PackageCache/com.unity.burst@1.8.4/Runtime/BurstCompiler.cs:226)
UnityEditor.U2D.Animation.TriangulationUtility+ValidateCollinear_0000072E$BurstDirectCall.Constructor () (at <041734514971422b990000a1a12760aa>:0)
UnityEditor.U2D.Animation.TriangulationUtility+ValidateCollinear_0000072E$BurstDirectCall..cctor () (at <041734514971422b990000a1a12760aa>:0)
Rethrow as TypeInitializationException: The type initializer for 'UnityEditor.U2D.Animation.ValidateCollinear_0000072E$BurstDirectCall' threw an exception.
$BurstDirectCallInitializer.Initialize () (at <041734514971422b990000a1a12760aa>:0)
重点看InvalidOperationException: Burst failed to compile the function pointer `Int32
说明输入有问题,这是因为unity版本和输入系统版本不匹配导致,输入系统版本旧了
解决:
edit==>project settings ==> Player ==> other settings ==> Active Input Handling
设置成新版 或者 both就可以!
根据你的项目需要和使用的 Unity 版本,选择不同的选项可能会对输入系统产生影响,例如:文章来源:https://www.toymoban.com/news/detail-736192.html
- 如果你的项目需要使用旧版 Unity 的输入功能,你应该选择 Input Manager 选项。
- 如果你正在使用 Unity 2019.1 或更高版本,并且想使用新版的 Unity 输入系统,你应该选择 Input System Package 选项。
无论你选择哪个选项,你都需要相应地更新和配置你的输入系统,以确保它可以与你的项目一起正常工作。文章来源地址https://www.toymoban.com/news/detail-736192.html
到了这里,关于unity异常:InvalidOperationException: Burst failed to compile the function pointer `Int32的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!