MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetNodeDebugInfo

Method GetNodeDebugInfo

Source/Engine/AI/Behavior.cpp:207–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207String Behavior::GetNodeDebugInfo(const BehaviorTreeNode* node, Behavior* behavior)
208{
209 if (!node)
210 return String::Empty;
211 BehaviorUpdateContext context;
212 Platform::MemoryClear(&context, sizeof(context));
213 if (GetNodeDebugRelevancy(node, behavior))
214 {
215 // Pass behavior and knowledge data only for relevant nodes to properly access it
216 context.Behavior = behavior;
217 context.Knowledge = &behavior->_knowledge;
218 context.Memory = behavior->_knowledge.Memory;
219 context.RelevantNodes = &behavior->_knowledge.RelevantNodes;
220 context.Time = behavior->_totalTime;
221 }
222 return node->GetDebugInfo(context);
223}
224
225#endif

Callers 1

UpdateDebugInfoMethod · 0.80

Calls 2

MemoryClearFunction · 0.85
GetDebugInfoMethod · 0.80

Tested by

no test coverage detected