NodeCanvas Forums › Support › [BUG] StartGraph should have been called in play mode only
Tagged: bug
Unity 2018.4.21f1 and Nodecanvas v3.05
When I exit play mode in the editor I get the below error and stack trace 4 times, they are all identical. I just have a single BehaviorTreeOwner in the scene and I don’t call StartGraph anywhere.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
StartGraph should have been called in play mode only. UnityEngine.Debug:Assert(Boolean, String) NodeCanvas.Framework.Graph:StartGraph(Component, IBlackboard, UpdateMode, Action1) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:528) NodeCanvas.Framework.IGraphAssignableExtensions:TryStartSubGraph(IGraphAssignable, Component, Action 1) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/IGraphAssignableExtensions.cs:35) NodeCanvas.BehaviourTrees.SubTree:OnExecute(Component, IBlackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Nodes/Leafs/SubTree.cs:31) NodeCanvas.Framework.Node:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Node.cs:293) NodeCanvas.Framework.Connection:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Connection.cs:199) NodeCanvas.BehaviourTrees.Selector:OnExecute(Component, IBlackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Nodes/Composites/Selector.cs:27) NodeCanvas.Framework.Node:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Node.cs:293) NodeCanvas.Framework.Connection:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Connection.cs:199) NodeCanvas.BehaviourTrees.Parallel:OnExecute(Component, IBlackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Nodes/Composites/Parallel.cs:47) NodeCanvas.Framework.Node:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Node.cs:293) NodeCanvas.Framework.Connection:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Connection.cs:199) NodeCanvas.BehaviourTrees.Selector:OnExecute(Component, IBlackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/Nodes/Composites/Selector.cs:27) NodeCanvas.Framework.Node:Execute(Component, IBlackboard) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Node.cs:293) NodeCanvas.BehaviourTrees.BehaviourTree:Tick(Component, IBlackboard) (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/BehaviourTree.cs:99) NodeCanvas.BehaviourTrees.BehaviourTree:OnGraphUpdate() (at Assets/ParadoxNotion/NodeCanvas/Modules/BehaviourTrees/BehaviourTree.cs:86) NodeCanvas.Framework.Graph:UpdateGraph(Single) (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:687) NodeCanvas.Framework.Graph:UpdateGraph() (at Assets/ParadoxNotion/CanvasCore/Framework/Runtime/Graphs/Graph.cs:680) ParadoxNotion.Services.MonoManager:Update() (at Assets/ParadoxNotion/CanvasCore/Common/Runtime/Services/MonoManager.cs:98) |
https://www.accidentalee.com
Hello,
Sorry for the late reply, but it seems I’ve missed your post :/
Can you please post the graph for me here? It looks like you are using SubGraphs. Can you please confirm whether or not the errors take place only when you exit play mode when a SubGraph is running, or it always takes place?
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Hi,
It’s alright. The graph is scene bound, how can I isolate it and send it here without saving it as an asset? Or do you mean send a screenshot?
It doesn’t happen when sub-graphs are disabled from the tree.
It also doesn’t happen if I un-check the “Repeat” bool from the Behavior Tree Owner inspector even when sub-trees are enabled. Guess since they complete running before I exit the play-mode they don’t cause a problem.
https://www.accidentalee.com
You probably meant the bt file, it’s very incomplete btw I’ve been just scaffolding a new behavior. attached.
https://www.accidentalee.com
bump
https://www.accidentalee.com
Hello again and sorry for the late reply. I have answered to your email regarding this error. For your convenience, this was my answer to that email.
“Please note that this error when exiting playmode does not really create any unwanted behaviours and you can generally ignore it (unless you see it not only when exiting playmode). Of course, it is still an error and I have to fix it, but it bothers you that it gets in the way, You can quickly remove the assert that throws that error (or I can send you that quickfix myself).”
Thank you and please excuse the late reply.
Join us on Discord: https://discord.gg/97q2Rjh