Reply To: [Bug] Graph OnEnable() fires on Load, causes errors

NodeCanvas Forums Support [Bug] Graph OnEnable() fires on Load, causes errors Reply To: [Bug] Graph OnEnable() fires on Load, causes errors


Node Canvas Version: 3.2.1

Unity Version: 2020.3.14 lts



1. Created simple script to add all scripts under Assets folder to type prefs editor. And then used it to collect all possible types.

2. Create AOT.cs, link.xml.

3. Launch game in XBOX Scarlett (the new xbox series)

4. Got an errors when load Player object that has FSM. then game crashes.

5. Works fine if i get rid of player. (no errors appear)


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.fsReflectedConvert

n.JSONSerializer.TryDeserializeOverwrite[T] (T instance, System.String json, System.Collections.Generic.List1[T] references) [0x00000] in <00000000000000000000000000000000>:0   at NodeCanvas.Framework.Graph.Deserialize (System.String serializedGraph, System.Collections.Generic.List1[T] references, System.Boolean validate) [0x00000] in <00000000000000000000000000000000>:0   at NodeCanvas.Framework.Graph.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () [0x00000] in <0000000000000000000000 ………………






Are their any possible errors in AOT Platform even if I have created AOT Classes?

I wonder why that error has appeared. and how  snugglepilot have managed to fix this.