FlowCanvas Forums › Support › Type Request Errors when reimporting
Hi there,
we’ve been working with FlowCanvas for a while and like it very much. We’ve wrote a suite of custom nodes that inherite from your FlowControlNode and use them as a custom narrative system controlling other scripts and objects in our game.
Our project is structured as following: The FlowCanvas code is located in the ParadoxNotion folder on root level and is assigned to its own assembly by using an Assembly Definition File. The custom nodes we wrote are located in their own folder also on root level but with no special assembly. Therefore, they are assigned to the default “Assembly-CSharp.dll” assembly by Unity.
Now to the problem: When reimporting our graphs (bound to assets) we get Type Request Errors for each of our custom nodes. A exemplary log is below. They look all the same.
So far we could not notice any functional errors when running the game or building. We also haven’t seen the Type Request Errors pop up any other time than when reimporting the graphs.
Do you think these errors can become problematic down the road or are they just a symptom of Unity’s loading/compiling order? What do you suggest could help getting rid of them?
Best and thank you
Marius
Here’s the log:
<b>(Type Request Error)</b>: Type with name ‘HitchHiker.ChangeBranchModeNarrativeNode’ could not be resolved.
UnityEngine.Logger:Log(LogType, String, Object, Object)
ParadoxNotion.Services.Logger:ForwardToUnity(LogType, Object, String, Object) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/Logger.cs:102)
ParadoxNotion.Services.Logger:Internal_Log(LogType, Object, String, Object) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/Logger.cs:93)
ParadoxNotion.Services.Logger:LogError(Object, String, Object) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/Logger.cs:50)
ParadoxNotion.ReflectionTools:GetType(String, Boolean, Type) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/ReflectionTools.cs:98)
ParadoxNotion.Serialization.FullSerializer.Internal.fsTypeCache:GetType(String, Boolean, Type) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/Reflection/fsTypeCache.cs:17)
ParadoxNotion.Serialization.FullSerializer.Internal.fsTypeCache:GetType(String, Type) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/Reflection/fsTypeCache.cs:15)
ParadoxNotion.Serialization.fsRecoveryProcessor2:OnBeforeDeserialize(Type, fsData&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/fsRecoveryProcessor.cs:27)
1, Type, fsData&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:169)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:Invoke_OnBeforeDeserialize(List
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_3_Inheritance(Type, fsData, Type, Object&, List1&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:800)
1&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:743)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_1_CycleReference(Type, fsData, Type, Object&, List
ParadoxNotion.Serialization.FullSerializer.fsSerializer:TryDeserialize(fsData, Type, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:705)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:TryDeserialize(fsData, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:678)
ParadoxNotion.Serialization.FullSerializer.Internal.fsIEnumerableConverter:TryDeserialize(fsData, Object&, Type) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/Converters/fsIEnumerableConverter.cs:73)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_5_Converter(Type, fsData, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:886)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_4_Cycles(Type, fsData, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:878)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_3_Inheritance(Type, fsData, Type, Object&, List1&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:857)
1&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:743)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_1_CycleReference(Type, fsData, Type, Object&, List
ParadoxNotion.Serialization.FullSerializer.fsSerializer:TryDeserialize(fsData, Type, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:705)
ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter:TryDeserialize(fsData, Object&, Type) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/Converters/fsReflectedConverter.cs:97)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_5_Converter(Type, fsData, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:886)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_4_Cycles(Type, fsData, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:878)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_3_Inheritance(Type, fsData, Type, Object&, List1&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:857)
1&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:743)
ParadoxNotion.Serialization.FullSerializer.fsSerializer:InternalDeserialize_1_CycleReference(Type, fsData, Type, Object&, List
ParadoxNotion.Serialization.FullSerializer.fsSerializer:TryDeserialize(fsData, Type, Type, Object&) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/Full Serializer/fsSerializer.cs:705)
ParadoxNotion.Serialization.JSONSerializer:Deserialize(Type, String, List1, Object) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/JSONSerializer.cs:102)
1, GraphSerializationData) (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Serialization/JSONSerializer.cs:73)
ParadoxNotion.Serialization.JSONSerializer:Deserialize(String, List
NodeCanvas.Framework.Graph:Deserialize(String, Boolean, List`1) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:133)
NodeCanvas.Framework.Graph:Deserialize() (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:97)
NodeCanvas.Framework.Graph:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:48)
Hello and thank you for your feedback.
I am glad to know you are using and enjoying FlowCanvas in your project.
The issue seems to be due to the Deserialization in unity (from which where the Type Request error is coming from), which is taking place in arbitrary order and usually multiple times. As far as I can tell, Deserialization is invoked once for each assembly (where the problem is thrown since your custom nodes are not found) and then once again after all assembly definitions are loaded, but I have to check this more thoroughly for whether that is true or not.
Obviously the safest solution of them all, would be to have your custom nodes in the same assembly definition with FlowCanvas itself.
You could for example place the assembly definition file in the “ParadoxNotion” root folder (if not already) and create a subfolder there to hold all your custom nodes. Doing this is still update friendly, since only the “CanvasCore” and the “FlowCanvas” folders are changed when updating.
Would that be an adequate solution for you?
Thanks 🙂
Join us on Discord: https://discord.gg/97q2Rjh