Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2019.4.X, 2020.3.X, 2021.2.X
Class get stripped when using Preserve attribute with Mono backend
How to reproduce:
1. Open the attached "xmlDeserializationTest.zip" project
2. Check if scripting backend is set to "Mono", and ManagedStrippingLevel to "low"
3. Build and run "SampleScene" Scene on Standalone
Expected result: Class does not get stripped when using Preserve attribute
Actual result: Class gets stripped when using Preserve attribute
Error shown in the console:
"MissingMethodException: Default constructor not found for type System.Diagnostics.SystemDiagnosticsSection"
Reproducible with: 2018.4.35f1, 2019.4.27f1, 2020.3.10f1, 2021.1.8f1, 2021.2.0a18
- The issue does not occur in Editor
- The issue does not occur when using the IL2CPP scripting backend
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- The script can be dragged and dropped before it is compiled
- Double clicking script field no longer opens it in the external script editor
- [Android] Build fails with built-in PAD custom asset(s) when using sample Addressable
- [iOS] nw_read_request_report crash
- The serialized field value cannot be changed when trying to set it back to "None"