[SOLVED] Unable to find internal function ...

Hey,

I’ve search on google and tryed implementing the solution that seemed to work for others, but it does not for me. I noticed it while building for iOS, then switching Android to use IL2CPP instead of Mono made the error occur again, so I’m pretty sure that’s the reason.

People said to add a link.xml file inside the Assets folder, which I did but it does not seem to work. Here’s the code that I wrote inside the link.xml file :

<linker>
  <assembly fullname="Unity.Collections.LowLevel.Unsafe.UnsafeUtility"/>
    <type fullname ="Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCmp" preserve="all"/>
    <type fullname ="Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemMove" preserve="all"/>
    <type fullname ="Unity.Collections.LowLevel.Unsafe.UnsafeUtility.ReleaseGCObject" preserve="all"/>

  <assembly fullname="UnityEngine.Jobs.TransformAccessArray"/>
    <type fullname ="UnityEngine.Jobs.TransformAccessArray.GetSortedToUserIndex" preserve="all"/>
    <type fullname ="UnityEngine.Jobs.TransformAccessArray.GetSortedTransformAccess" preserve="all"/>

  <assembly fullname="UnityEngine.Jobs.TransformAccess"/>
    <type fullname ="UnityEngine.Jobs.TransformAccess.GetRotation" preserve="all"/>
    <type fullname ="UnityEngine.Jobs.TransformAccess.GetPosition" preserve="all"/>
    <type fullname ="UnityEngine.Jobs.TransformAccess.SetPosition" preserve="all"/>
    <type fullname ="UnityEngine.Jobs.TransformAccess.SetRotation" preserve="all"/>
</linker>

I have errors for those 9 functions. I have tried setting the preserve to all only on UnityEngine.Jobs and Unity.Collections.LowLevel.Unsafe.UnsafeUtility but same, it does not work.

I’m using Unity 2019.2.6 by the way. Any idea ?

I finally made it work, apparently more libraries were in need of preservation. This is the code in the link.xml :

<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" />
</linker>

Maybe some of them are not needed, but at least it works with that.

9 Likes

This helped me. I was able to drop all the “*.Tests” packages though.