Code stripping
Unity supports code stripping as part of the engine. Code stripping automatically removes unused or unreachable code during the Unity build process, to decrease the application’s final size.
Setting code stripping above Minimal level is risky and might break your game by removing code that's needed for it to run.
Starting from 1.4.0, we're generating a link.xml
file in Assets/coherence/link.xml
with the needed directives to support the coherence SDK. This file is generated at build time, and deleted after the build.
If you're on previous versions of the SDK, and you're considering using code stripping above Low level, add the following link.xml file anywhere in your project (e.g., Assets/link.xml
):
Read more on how link.xml works in Unity on their code stripping 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 us.
Last updated
Was this helpful?