I’m porting a game to Switch and PS5 which requires IL2CPP. The issue is that some of them crash. I get
TargetException: Non-static field requires a target
at System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
at System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsListConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
Which sadly doesn’t tell me where and what is causing it to crash. Via build a PC version with IL2CPP and putting in break points I was able to narrow down a FSM that is causing the issue, but I have no idea which part of it is.
There are the “reflection” based nodes, but as far as I can tell the multiplatform versions are being used, with the possible exception of checkVariable which is not listed under the Reflection nodes however checkFunction and checkProperty are. Is this the culprit? Is there a multiplatform version that I could modify them to be?
FSM JSON attached for reference (it actually a .JSON file not a .FSM file)