If you use Reflexion, Unity could wrongly assume that your assembly is unused and strip your code when compiling with IL2CPP backend.
link.xml
files are ignored when placed in UPM packages
Add a linkmerge.xml
file at your package root.
Fill the document with your assemblies
<linker>
<assembly fullname="Your.PackageName1.Runtime" preserve="all"/>
<assembly fullname="Your.PackageName2.Runtime" preserve="all"/>
</linker>
If your package is installed via openupm registry, you can add this package as dependency
// package.json
// ...
"dependencies": {
"com.realitystop.linkmerge": "1.0.0"
},
// ...