I have a mobile app project which builds smooth and without any errors on Android. But when I try to build it to an iOS device, I get this error in Xcode:
Unable to find internal function `UnityEngine.Jobs.TransformAccess::GetWorldToLocalMatrix`
Unity.Burst.BurstCompilerHelper:IsCompiledByBurst(Delegate)
Unity.Burst.BurstCompilerHelper:.cctor()
Unity.Burst.BurstCompiler:Compile(T, Boolean)
Unity.Entities.ComponentSystemGroup:.cctor()
Unity.Entities.InitializationSystemGroup:.ctor()
System.Reflection.MonoCMethod:InternalInvoke(Object, Object[])
System.Activator:CreateInstance(Type, Boolean)
Unity.Entities.TypeManager:ConstructSystem(Type)
Unity.Entities.World:CreateSystemInternal(Type)
Unity.Entities.World:GetOrCreateSystem()
Unity.Entities.DefaultWorldInitialization:AddSystemToRootLevelSystemGroupsInternal(World, IEnumerable`1, Int32)
Unity.Entities.DefaultWorldInitialization:Initialize(String, Boolean)
Unity.Entities.AutomaticWorldBootstrap:Initialize()
Unity builds the project to Xcode just fine, and Xcode also seems to build the project to the device, but when it runs on the device, it throws this error and crashes... I tried to look up different solutions on the internet and I found some links but none of these worked so far:
https://forum.unity.com/threads/solved-unable-to-find-internal-function.777044/ https://forum.unity.com/threads/unable-to-find-internal-function-with-transport-library-on-ios.731471/
Any idea what could potentially cause this error? BTW, I'm using Unity 2020.2.1f1
EDIT | UPDATE If I build the project with "Development Build" enabled it runs normally on IL2CPP Android & iOS. But If I uncheck the Development Build, it crashes like before, on both Android and iOS IL2CPP builds. Strange. Any possible info on this? Building the same project on Mono on Android also works smooth... Looks like a Code Stripping error to me, I tried the following solutions:
- Disabling Strip Engine Code
- Updating Jobs and Burst packages
- Enabling/Disabling Burst compilation
None of these worked so far. :(
I also added a link.xml file into assets folder, it looks like this
<linker>
<assembly fullname="Unity.Collections" preserve="all" />
<assembly fullname="Unity.Collections.Tests" preserve="all" />
<assembly fullname="Unity.Burst.Tests" preserve="all" />
<assembly fullname="Unity.Transforms" preserve="all" />
<assembly fullname="Unity.Transforms.Hybrid" preserve="all" />
<assembly fullname="Unity.Transforms.Tests" preserve="all" />
<assembly fullname="Unity.Jobs" preserve="all" />
<assembly fullname="Unity.Jobs.Tests" preserve="all" />
<assembly fullname="Unity.Burst" preserve="all" />
<assembly fullname="UnityEngine">
<type fullname="UnityEngine.*" preserve="all"/>
<type fullname="UnityEngine.Jobs.*" preserve="all"/>
<type fullname="UnityEngine.Jobs.TransformAccess.*" preserve="all"/>
</assembly>
</linker>