Great, thanks 🙂
No problem, lets hope the package is updated so that we don’t have to apply this fix manually.
Can confirm the asset store package was updated and the issue is fixed, thanks!
My guess is that onFinish is never called in your custom task because you need to notify NodeCanvas that the action has been completed by calling the EndAction() method.
I’m also getting this error, same Unity and NodeCanvas version as OP, I’m on Windows 10 though.
The errors are gone, thanks!
Btw those new visual changes look good 👍
Great, thanks!
Tested the code changes and can confirm this issue is no longer happening, thank you very much @Gavalakis.
Will this fix be included in the next official NodeCanvas release?
Yeah it’s very odd how Unity’s OnAfterDeserialize behaves. Thanks @Gavalakis!
The problem I see with a lazy approach is that deserialization would be inconsistent and dependent on when the user references a blackboard variable in their graphs, deserialization could even happen during gameplay if the graph uses no blackboard variables until later nodes.
What about doing it in Awake instead?
Did a quick research and it seems to be related to the way Unity handles ISerializationCallbackReceiver.OnAfterDeserialize (which is used in both Blackboard.cs and Graph.cs):
https://forum.unity.com/threads/proper-use-of-onafterdeserialize.499076/#post-3245891
Unity deserializes all UnityEngine.Object’s in a different thread, which would explain why those references are not ready yet during the blackboard/graph deserialization methods.
Yeah, I’m really liking NodeCanvas, the workflow is awesome, but seeing other posts from people having serialization problems too and the developer not being very active lately in the forums is a bit worrying 😕
I’m also facing this issue, but in my case when referencing an InputActionReference (which is a ScriptableObject from the New Input System) in a custom condition task. When trying to edit the sub-graph (owner is NOT a prefab) I get the following error message:
Restarting Unity fixes this, but what leads me to believe it’s the same problem that Maxwell is facing is that after following his reproduction steps the error message and even the stacktrace are identical to mine (see attached screenshots).
Are there any updates on this issue?
Thanks in advance.
Edit: I’m using Unity 2021.1.19 and NodeCanvas 3.2.1.
Nice, thanks 🙂
I was going to ask for the same feature but found this thread, having NodeCanvas automatically show sub-graphs on Play mode would be really nice, I really enjoy using sub-graphs but having to manually click on them while the game is running just slows down the debugging process.