I’m seeing MissingReferenceException’s in FlowCanvas caused by what’s certainly an edge case for you. We apply some funky scene post-processing in our game that destroys a bunch of scene objects before entering play mode and then re-creates them after the the scene is loaded.
Exception triggered in FlowCanvas\Module\Nodes\Variables\GetVariable.cs at line 67. The blackboard variable’s value has been destroyed but it’s not a true null so the call to GetPrefabType fails.
Happens in Node/FlowCanvas 2.8.5 but was seeing it in earlier versions as well
Only triggered in the Editor when I have the FlowCanvas Window open.
Only happens for Blackboard variables that point to scene objects that are destroyed as part of the scene post processing.
Full call stack attached. Error is fixed by adding a “fake-null” check in the if statement on line 62.
I’m on Node/FlowCanvas 2.8.5 and I’m getting NullRefs when I’m in the Editor, I have the FlowCanvas Window open and I start a scene
Ah, I see what is going on. Even if it’s a very special case, it’s nice to have everything cleaned up, so thanks for reporting this 🙂
If by “fake null” you mean something like that !value.value.Equals(null), then this is what I usually do to make sure that the UnityObject is truly null and what I just added in the GetVariable to avoid this problem.
Yeah, that’s what I meant by “fake null”. I figured it’s a real edge case for you but like you said – it’s nice to have everything tied up.
Thanks for a great pair of assets by the way! NodeCanvas and FlowCanvas are absolutely crucial for our game and we use them both extensively. I promise to send you an extensive feedback doc once the game is finally out and I have some time. 🙂