Quantcast
Channel: Questions in topic: "il2cpp"
Viewing all articles
Browse latest Browse all 598

IL2CPP: PROPERTYINFO.SETVALUE SETS A RANDOM NUMBER TO A NULLABLE VALUE TYPE WHEN NULL IS EXPECTED.

$
0
0
Hui WuMarch 31, 2020 14:52 We use reflection to deserialize some value into C# types. We encounter an issue where if we have a class NullableContainer { public Int64? NullableValue { get; set; } } And if we want to set a `null` to `NullableValue` via reflection: PropertyInfo.SetValue, the value is set to a meaningless non-zero number. I tried to trace where the issue is, and it looks like the NULL set by generated IL2CPP code, is eventually getting interpreted as an empty array, and then the first element is read to be the value. Is this a known issue? Is there a walk-around?

Viewing all articles
Browse latest Browse all 598

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>