Search Issue Tracker
Fixed in 2020.2.X
Fixed in 2020.1.X
Votes
0
Found in
2020.1.0b2
2020.1.0b14
2020.2.0a3
Issue ID
1263916
Regression
Yes
[IL2CPP] Managed Code Stripping strips a parameterless constructor from a managed dll when using IL2CPP Scripting Backend
Reproduction steps:
1. Open the attached "1263916 repro" project
2. Open Build Settings from File > Build Settings
3. Make sure that "Development Build" is checked
4. Build and Run the project
Expected result: no error is thrown and the "double_this_int" method returns 26
Actual result: MissingMethodException is thrown
Reproducible with: 2020.1.0b2, 2020.1.1f1, 2020.2.0a3, 2020.2.0a19
Not reproducible with: 2018.4.25f1, 2019.4.5f1, 2020.1.0b1, 2020.2.0a2
Notes:
-This doesn't reproduce with any Managed Stripping level on Mono Scripting Backend
-The 3rd step isn't mandatory and doesn't affect the outcome, it's there only to illustrate the issue more easily
-The full error is:
MissingMethodException: A parameterless constructor is required for type 'ManagedPlugin.Helper/Thing'.
at ManagedPlugin.Helper.double_this_int (System.Int32 x) [0x00000] in <00000000000000000000000000000000>:0
at Test.Start () [0x00000] in <00000000000000000000000000000000>:0
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Input Field ignores first keyboard input when calling Focus() from code
- GC Alloc when using Graphics.RenderMeshInstanced
- [VFX Graph][URP] VFX crashes on URP when dragging VFX asset to the Hierarchy window
- InvalidOperationException when using AsyncGPUReadback.RequestIntoNativeArray
- Generated Entities look different when Depth Priming Mode is changed
Resolution Note (fix version 2020.2):
Fixed in 2020.2.0b2
Resolution Note (fix version 2020.1):
Fixed in 2020.1.11f1