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

Method GetDebugInfo

Source/Engine/AI/BehaviorTreeNodes.cpp:270–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268#if USE_EDITOR
269
270String BehaviorTreeDelayNode::GetDebugInfo(const BehaviorUpdateContext& context) const
271{
272 if (context.Memory)
273 {
274 const auto state = GetState<State>(context.Memory);
275 return String::Format(TEXT("Time Left: {}s"), Utilities::RoundTo2DecimalPlaces(state->TimeLeft));
276 }
277
278 String delay;
279 if (WaitTimeSelector.Path.HasChars())
280 delay = String(WaitTimeSelector.Path);
281 else
282 delay = StringUtils::ToString(WaitTime);
283 if (RandomDeviation > 0.0f)
284 delay += String::Format(TEXT("+/-{}"), RandomDeviation);
285 return String::Format(TEXT("Delay: {}s"), delay);
286}
287
288#endif
289

Callers 1

GetNodeDebugInfoMethod · 0.80

Calls 11

RoundTo2DecimalPlacesFunction · 0.85
DistanceFunction · 0.85
GetNamePathMethod · 0.80
ToStringFunction · 0.70
FormatFunction · 0.50
StringClass · 0.50
HasCharsMethod · 0.45
GetMethod · 0.45
ToStringMethod · 0.45
GetPositionMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected