Code Stripping

Unity supports Code Strippingarrow-up-right as part of the engine. Code stripping means automatically removing unused or unreachable code during the Unity build process to try and significantly decrease your application’s final size.

triangle-exclamation

If you're considering using code stripping above Low level, add the following link.xml file anywhere in your project (we recommend Assets/coherence/link.xml):

<linker>
  <assembly fullname="System">
    <type fullname="System.Net.Configuration.ConnectionManagementSection" />
    <type fullname="System.Net.Configuration.ConnectionManagementElementCollection" />
    <type fullname="System.Net.Configuration.NetSectionGroup" />
  </assembly>

  <assembly fullname="System.Configuration">
    <type fullname="System.Configuration.ExeConfigurationHost" />
  </assembly>
</linker>

Read more on how link.xml works in Unity on their Code Strippingarrow-up-right section.

In any case, there's no one-size-fits-all solution to be safe when it comes to code stripping. It highly depends on your project, and also your dependencies (third party libraries and assets used).

If you are experiencing issues with coherence while using code stripping, reach out to usarrow-up-right.

Was this helpful?