Skip to main content

How to Prevent Package CodeStripping IL2CPP Unity

✍ Last Updated : November 15, 2022

🚪 Prequisite Knowledge (Optional)

Describe Initial Knowledge that reader need to know before reading this article

❓ Key Question / Problem / Issue

How to prevent package code stripping in IL2CPP Unity

✅ Expected Output/Definition of Done

Define what information you really need and the definition of done

🎁 Resulting Solution

  1. Add file linkmerge.xml in your package root

    <linker>
        <assembly fullname="[packagename]" preserve="all"/>
    </linker>
    
  2. Add Package com.realitystop.linkmerge from openupm/github on your parent project.

GitHub - RealityStop/Unity.LinkMerge