Quick answer: Unity IL2CPP build runtime-throws MissingMethodException on a method that the editor can find. Code stripping removed it because it’s only called via reflection or an interface.

JSON deserialization via reflection fails in build for a class’s property setter. IL2CPP stripped it as “unused” because no direct call exists.

Add a link.xml

<linker>
  <assembly fullname="MyAssembly">
    <type fullname="MyApp.PlayerData" preserve="all"/>
  </assembly>
</linker>

Mark types reflection touches as preserved. Place link.xml under Assets/ or any folder Unity processes.

[Preserve] Attribute

For a single class, [Preserve] attribute on the type / method keeps it. Lighter than link.xml when you can edit the source.

Code Stripping Level

Player Settings → Managed Stripping Level. Low strips conservatively; High aggressively. Bump to Low if you can’t enumerate every reflected type.

Newtonsoft / System.Text.Json

JSON libraries hit reflection problems heavily. Both ship link.xml templates — copy from their docs.

Verifying

Build runs reflection paths without missing-method exceptions. Test every save / load / serialization path on the actual build.

“Reflection on stripped builds needs link.xml. Mark types preserve = all.”

Test build behavior in a development build before shipping — release builds strip more aggressively and surface different missing methods.