NodeCanvas Forums › Support › Refactoring BTs › Reply To: Refactoring BTs
Hi Gavalakis,
I’ve upgraded our project to Unity 2018.3.0f2, and I was trying out AssetDatabase.ForceReserializeAssets();
to see how that would affect the serialized data of NodeCanvas. It looks like most of the data is deserialized and then serialized to the current version, but there are exceptions. Some Scenes have PrefabInstances and the data in the scene file shows old version serialized data under the m_Modifications of “propertyPath: boundGraphSerialization”. Will this affect anything? Is this stale data?
Speaking of ‘boundGraphSerialization, I remembered we talked about it in this thread: https://nodecanvas.paradoxnotion.com/forums/topic/some-questions-and-requests-regarding-serialization/
I tried an unconditional boundGraphInstance.hideFlags = HideFlags.HideAndDontSave;
and ran another ForceReserializeAssets. In the scene files, the duplicate data was removed as expected (though the PrefabInstance m_Modifications data as discussed above remains). All seems to be working fine, but I did get a bunch of errors during/after the force reserialization:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ArgumentException: Object type UnityEngine.Object cannot be converted to target type: UnityEngine.Transform Parameter name: val System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoField.cs:148) System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/FieldInfo.cs:150) ParadoxNotion.Serialization.FullSerializer.Internal.fsMetaProperty.Write (System.Object context, System.Object value) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/Reflection/fsMetaProperty.cs:117) ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/Converters/fsReflectedConverter.cs:102) ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:886) ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:878) ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (System.Type overrideConverterType, ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List 1& processors) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:857) ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (System.Type overrideConverterType, ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List 1& processors) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:743) ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:705) UnityEngine.Logger:LogException(Exception) ParadoxNotion.Services.Logger:ForwardToUnity(LogType, Object, String, Object) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/Logger.cs:100) ParadoxNotion.Services.<Internal_Log>c__AnonStorey0:<>m__0() (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/Logger.cs:88) UnityEditor.EditorApplication:Internal_CallDelayFunctions() |