You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
For some reason IL2CPP strips the NullableAttribute:.ctor(byte) constructor when using High Stripping Level, which it shouldn't as the attribute is clearly used in the referenced invokation.
Motivation
Even high managed stripping level should work.
Suggested solution
Add the following to the link.xml inside the package:
I also ran into this and your workaround works for me too! Looking around for the error initially, I also found a post on the unity forum of the "same" issue:
- Moved link.xml into Newtonsoft.Json.csproj as embedded resource
- Fixed LogicalName
- Added preservations for the NullableAttribute and NullableContextAttribute to resolve#54
- Added some more preservations for some converters to resolve#8 and #65
- Updated CHANGELOG.md
Description
Based on the issue found by @SwingWren in #52
For some reason IL2CPP strips the
NullableAttribute:.ctor(byte)
constructor when using High Stripping Level, which it shouldn't as the attribute is clearly used in the referenced invokation.Motivation
Even high managed stripping level should work.
Suggested solution
Add the following to the
link.xml
inside the package:Add a forum post on https://forum.unity.com asking if this is intended or buggy behaviour
Inspiration sources
Media
Signature from metadata inside Visual Studio:
IL:
JObject.get_Item source code:
https://github.com/jilleJr/Newtonsoft.Json-for-Unity/blob/dcc556f12e7663526356c828da9736f69048bbf0/Src/Newtonsoft.Json/Linq/JObject.cs#L352-L382
Error message on build:
The text was updated successfully, but these errors were encountered: