You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guillaume edited this page May 23, 2018
·
1 revision
Link.xml is a special file used by Unity to customise the code stripping in IL2CPP.
IL2CPP is a Unity tool that will take C# compiled code & translate it to C++ to compile it on the target platform (iOS or Android in this case)
But to reduce the size & workload, it use static code analysis to strip from the process all C# classes that aren't used in your code. 99% of the time everything work as expected, but if the code use some corner cases techniques like dynamic reflection, the code analysis won't catch it (as it is happening at runtime) and will remove classes that the code will fail to find when running.
To fix that, we can use the Link.xml file to tell IL2CPP to not remove some class/namespace from the build even if it can't detect any use for it.